mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 10:03:42 +08:00 
			
		
		
		
	docs: set experimental annotation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
		@@ -487,7 +487,8 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
 | 
				
			|||||||
	flags.StringArrayVar(&options.platforms, "platform", platformsDefault, "Set target platform for build")
 | 
						flags.StringArrayVar(&options.platforms, "platform", platformsDefault, "Set target platform for build")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if isExperimental() {
 | 
						if isExperimental() {
 | 
				
			||||||
		flags.StringVar(&options.printFunc, "print", "", "Print result of information request (e.g., outline, targets) [experimental]")
 | 
							flags.StringVar(&options.printFunc, "print", "", "Print result of information request (e.g., outline, targets)")
 | 
				
			||||||
 | 
							flags.SetAnnotation("print", "experimentalCLI", nil)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flags.BoolVar(&options.exportPush, "push", false, `Shorthand for "--output=type=registry"`)
 | 
						flags.BoolVar(&options.exportPush, "push", false, `Shorthand for "--output=type=registry"`)
 | 
				
			||||||
@@ -514,10 +515,14 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
 | 
				
			|||||||
	flags.StringVar(&options.provenance, "provenance", "", `Shorthand for "--attest=type=provenance"`)
 | 
						flags.StringVar(&options.provenance, "provenance", "", `Shorthand for "--attest=type=provenance"`)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if isExperimental() {
 | 
						if isExperimental() {
 | 
				
			||||||
		flags.StringVar(&invokeFlag, "invoke", "", "Invoke a command after the build [experimental]")
 | 
							flags.StringVar(&invokeFlag, "invoke", "", "Invoke a command after the build")
 | 
				
			||||||
		flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect [experimental]")
 | 
							flags.SetAnnotation("invoke", "experimentalCLI", nil)
 | 
				
			||||||
		flags.BoolVar(&options.Detach, "detach", false, "Detach buildx server (supported only on linux) [experimental]")
 | 
							flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect")
 | 
				
			||||||
		flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server) [experimental]")
 | 
							flags.SetAnnotation("root", "experimentalCLI", nil)
 | 
				
			||||||
 | 
							flags.BoolVar(&options.Detach, "detach", false, "Detach buildx server (supported only on linux)")
 | 
				
			||||||
 | 
							flags.SetAnnotation("detach", "experimentalCLI", nil)
 | 
				
			||||||
 | 
							flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server)")
 | 
				
			||||||
 | 
							flags.SetAnnotation("server-config", "experimentalCLI", nil)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// hidden flags
 | 
						// hidden flags
 | 
				
			||||||
@@ -540,6 +545,7 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
 | 
				
			|||||||
	flags.BoolVar(&ignoreBool, "squash", false, "Squash newly built layers into a single new layer")
 | 
						flags.BoolVar(&ignoreBool, "squash", false, "Squash newly built layers into a single new layer")
 | 
				
			||||||
	flags.MarkHidden("squash")
 | 
						flags.MarkHidden("squash")
 | 
				
			||||||
	flags.SetAnnotation("squash", "flag-warn", []string{"experimental flag squash is removed with BuildKit. You should squash inside build using a multi-stage Dockerfile for efficiency."})
 | 
						flags.SetAnnotation("squash", "flag-warn", []string{"experimental flag squash is removed with BuildKit. You should squash inside build using a multi-stage Dockerfile for efficiency."})
 | 
				
			||||||
 | 
						flags.SetAnnotation("squash", "experimentalCLI", nil)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flags.StringVarP(&ignore, "memory", "m", "", "Memory limit")
 | 
						flags.StringVarP(&ignore, "memory", "m", "", "Memory limit")
 | 
				
			||||||
	flags.MarkHidden("memory")
 | 
						flags.MarkHidden("memory")
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,6 +24,9 @@ func debugShellCmd(dockerCli command.Cli) *cobra.Command {
 | 
				
			|||||||
	cmd := &cobra.Command{
 | 
						cmd := &cobra.Command{
 | 
				
			||||||
		Use:   "debug-shell",
 | 
							Use:   "debug-shell",
 | 
				
			||||||
		Short: "Start a monitor",
 | 
							Short: "Start a monitor",
 | 
				
			||||||
 | 
							Annotations: map[string]string{
 | 
				
			||||||
 | 
								"experimentalCLI": "",
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		RunE: func(cmd *cobra.Command, args []string) error {
 | 
							RunE: func(cmd *cobra.Command, args []string) error {
 | 
				
			||||||
			printer, err := progress.NewPrinter(context.TODO(), os.Stderr, os.Stderr, progressMode)
 | 
								printer, err := progress.NewPrinter(context.TODO(), os.Stderr, os.Stderr, progressMode)
 | 
				
			||||||
			if err != nil {
 | 
								if err != nil {
 | 
				
			||||||
@@ -55,9 +58,15 @@ func debugShellCmd(dockerCli command.Cli) *cobra.Command {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	flags := cmd.Flags()
 | 
						flags := cmd.Flags()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect [experimental]")
 | 
						flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect")
 | 
				
			||||||
	flags.BoolVar(&options.Detach, "detach", runtime.GOOS == "linux", "Detach buildx server (supported only on linux) [experimental]")
 | 
						flags.SetAnnotation("root", "experimentalCLI", nil)
 | 
				
			||||||
	flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server) [experimental]")
 | 
					
 | 
				
			||||||
 | 
						flags.BoolVar(&options.Detach, "detach", runtime.GOOS == "linux", "Detach buildx server (supported only on linux)")
 | 
				
			||||||
 | 
						flags.SetAnnotation("detach", "experimentalCLI", nil)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server)")
 | 
				
			||||||
 | 
						flags.SetAnnotation("server-config", "experimentalCLI", nil)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flags.StringVar(&progressMode, "progress", "auto", `Set type of progress output ("auto", "plain", "tty"). Use plain to show container output`)
 | 
						flags.StringVar(&progressMode, "progress", "auto", `Set type of progress output ("auto", "plain", "tty"). Use plain to show container output`)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return cmd
 | 
						return cmd
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user