Merge pull request #6868 from bacongobbler/fix-6322

fix(version): implement `helm version -c`, mark as hidden
pull/6841/head
Matthew Fisher 6 years ago committed by GitHub
commit d3f183947a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1 @@
version.BuildInfo{Version:"v3.0+unreleased", GitCommit:"", GitTreeState:"", GoVersion:""}

@ -0,0 +1 @@
version.BuildInfo{Version:"v3.0+unreleased", GitCommit:"", GitTreeState:"", GoVersion:""}

@ -61,6 +61,8 @@ func newVersionCmd(out io.Writer) *cobra.Command {
f := cmd.Flags()
f.BoolVar(&o.short, "short", false, "print the version number")
f.StringVar(&o.template, "template", "", "template for version string format")
f.BoolP("client", "c", true, "display client version information")
f.MarkHidden("client")
return cmd
}

@ -32,6 +32,14 @@ func TestVersion(t *testing.T) {
name: "template",
cmd: "version --template='Version: {{.Version}}'",
golden: "output/version-template.txt",
}, {
name: "client",
cmd: "version --client",
golden: "output/version-client.txt",
}, {
name: "client shorthand",
cmd: "version -c",
golden: "output/version-client-shorthand.txt",
}}
runTestCmd(t, tests)
}

Loading…
Cancel
Save