Unverified Commit d3f18394 authored by Matthew Fisher's avatar Matthew Fisher Committed by GitHub

Merge pull request #6868 from bacongobbler/fix-6322

fix(version): implement `helm version -c`, mark as hidden
parents f2ba0696 444d006f
version.BuildInfo{Version:"v3.0+unreleased", GitCommit:"", GitTreeState:"", GoVersion:""}
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)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment