always add but hide experimental cmds and flags

Signed-off-by: Victor Vieux <vieux@docker.com>

update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>

allow client to talk to an older server

Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Victor Vieux
2016-11-02 17:43:32 -07:00
parent 086c47f5ee
commit 4ae7176ffb
23 changed files with 75 additions and 52 deletions

View File

@ -1,8 +1,6 @@
package stack
import (
"fmt"
"github.com/docker/docker/cli"
"github.com/docker/docker/cli/command"
"github.com/spf13/cobra"
@ -15,9 +13,10 @@ func NewStackCommand(dockerCli *command.DockerCli) *cobra.Command {
Short: "Manage Docker stacks",
Args: cli.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
fmt.Fprintf(dockerCli.Err(), "\n"+cmd.UsageString())
cmd.SetOutput(dockerCli.Err())
cmd.HelpFunc()(cmd, args)
},
Tags: map[string]string{"experimental": ""},
Tags: map[string]string{"experimental": "", "version": "1.25"},
}
cmd.AddCommand(
newConfigCommand(dockerCli),

View File

@ -36,7 +36,7 @@ func newDeployCommand(dockerCli *command.DockerCli) *cobra.Command {
opts.namespace = strings.TrimSuffix(args[0], ".dab")
return runDeploy(dockerCli, opts)
},
Tags: map[string]string{"experimental": ""},
Tags: map[string]string{"experimental": "", "version": "1.25"},
}
flags := cmd.Flags()