Skip to content

Commit 7a54721

Browse files
committed
docs: set experimental annotation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
1 parent daba16f commit 7a54721

2 files changed

Lines changed: 23 additions & 8 deletions

File tree

commands/build.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,8 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
487487
flags.StringArrayVar(&options.platforms, "platform", platformsDefault, "Set target platform for build")
488488

489489
if isExperimental() {
490-
flags.StringVar(&options.printFunc, "print", "", "Print result of information request (e.g., outline, targets) [experimental]")
490+
flags.StringVar(&options.printFunc, "print", "", "Print result of information request (e.g., outline, targets)")
491+
flags.SetAnnotation("print", "experimentalCLI", nil)
491492
}
492493

493494
flags.BoolVar(&options.exportPush, "push", false, `Shorthand for "--output=type=registry"`)
@@ -514,10 +515,14 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
514515
flags.StringVar(&options.provenance, "provenance", "", `Shorthand for "--attest=type=provenance"`)
515516

516517
if isExperimental() {
517-
flags.StringVar(&invokeFlag, "invoke", "", "Invoke a command after the build [experimental]")
518-
flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect [experimental]")
519-
flags.BoolVar(&options.Detach, "detach", false, "Detach buildx server (supported only on linux) [experimental]")
520-
flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server) [experimental]")
518+
flags.StringVar(&invokeFlag, "invoke", "", "Invoke a command after the build")
519+
flags.SetAnnotation("invoke", "experimentalCLI", nil)
520+
flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect")
521+
flags.SetAnnotation("root", "experimentalCLI", nil)
522+
flags.BoolVar(&options.Detach, "detach", false, "Detach buildx server (supported only on linux)")
523+
flags.SetAnnotation("detach", "experimentalCLI", nil)
524+
flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server)")
525+
flags.SetAnnotation("server-config", "experimentalCLI", nil)
521526
}
522527

523528
// hidden flags
@@ -540,6 +545,7 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
540545
flags.BoolVar(&ignoreBool, "squash", false, "Squash newly built layers into a single new layer")
541546
flags.MarkHidden("squash")
542547
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."})
548+
flags.SetAnnotation("squash", "experimentalCLI", nil)
543549

544550
flags.StringVarP(&ignore, "memory", "m", "", "Memory limit")
545551
flags.MarkHidden("memory")

commands/debug-shell.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ func debugShellCmd(dockerCli command.Cli) *cobra.Command {
2424
cmd := &cobra.Command{
2525
Use: "debug-shell",
2626
Short: "Start a monitor",
27+
Annotations: map[string]string{
28+
"experimentalCLI": "",
29+
},
2730
RunE: func(cmd *cobra.Command, args []string) error {
2831
printer, err := progress.NewPrinter(context.TODO(), os.Stderr, os.Stderr, progressMode)
2932
if err != nil {
@@ -55,9 +58,15 @@ func debugShellCmd(dockerCli command.Cli) *cobra.Command {
5558

5659
flags := cmd.Flags()
5760

58-
flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect [experimental]")
59-
flags.BoolVar(&options.Detach, "detach", runtime.GOOS == "linux", "Detach buildx server (supported only on linux) [experimental]")
60-
flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server) [experimental]")
61+
flags.StringVar(&options.Root, "root", "", "Specify root directory of server to connect")
62+
flags.SetAnnotation("root", "experimentalCLI", nil)
63+
64+
flags.BoolVar(&options.Detach, "detach", runtime.GOOS == "linux", "Detach buildx server (supported only on linux)")
65+
flags.SetAnnotation("detach", "experimentalCLI", nil)
66+
67+
flags.StringVar(&options.ServerConfig, "server-config", "", "Specify buildx server config file (used only when launching new server)")
68+
flags.SetAnnotation("server-config", "experimentalCLI", nil)
69+
6170
flags.StringVar(&progressMode, "progress", "auto", `Set type of progress output ("auto", "plain", "tty"). Use plain to show container output`)
6271

6372
return cmd

0 commit comments

Comments
 (0)