Unverified Commit a6f0d136 authored by Adam Reese's avatar Adam Reese
Browse files

fixup! ref(cmd,pkg/helm): remove server side version

Showing with 6 additions and 11 deletions
+6 -11
...@@ -107,7 +107,7 @@ func newRootCmd(args []string) *cobra.Command { ...@@ -107,7 +107,7 @@ func newRootCmd(args []string) *cobra.Command {
newUpgradeCmd(nil, out), newUpgradeCmd(nil, out),
newReleaseTestCmd(nil, out), newReleaseTestCmd(nil, out),
newVersionCmd(nil, out), newVersionCmd(out),
newCompletionCmd(out), newCompletionCmd(out),
newHomeCmd(out), newHomeCmd(out),
......
...@@ -22,27 +22,22 @@ import ( ...@@ -22,27 +22,22 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"k8s.io/helm/pkg/helm"
pb "k8s.io/helm/pkg/proto/hapi/version" pb "k8s.io/helm/pkg/proto/hapi/version"
"k8s.io/helm/pkg/version" "k8s.io/helm/pkg/version"
) )
const versionDesc = ` const versionDesc = `
Show the client and server versions for Helm and tiller. Show the version for Helm.
This will print a representation of the client and server versions of Helm and This will print a representation the version of Helm.
Tiller. The output will look something like this: The output will look something like this:
Client: &version.Version{SemVer:"v2.0.0", GitCommit:"ff52399e51bb880526e9cd0ed8386f6433b74da1", GitTreeState:"clean"} Client: &version.Version{SemVer:"v2.0.0", GitCommit:"ff52399e51bb880526e9cd0ed8386f6433b74da1", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.0.0", GitCommit:"b0c113dfb9f612a9add796549da66c0d294508a3", GitTreeState:"clean"}
- SemVer is the semantic version of the release. - SemVer is the semantic version of the release.
- GitCommit is the SHA for the commit that this version was built from. - GitCommit is the SHA for the commit that this version was built from.
- GitTreeState is "clean" if there are no local code changes when this binary was - GitTreeState is "clean" if there are no local code changes when this binary was
built, and "dirty" if the binary was built from locally modified code. built, and "dirty" if the binary was built from locally modified code.
To print just the client version, use '--client'. To print just the server version,
use '--server'.
` `
type versionCmd struct { type versionCmd struct {
...@@ -51,7 +46,7 @@ type versionCmd struct { ...@@ -51,7 +46,7 @@ type versionCmd struct {
template string template string
} }
func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command { func newVersionCmd(out io.Writer) *cobra.Command {
version := &versionCmd{out: out} version := &versionCmd{out: out}
cmd := &cobra.Command{ cmd := &cobra.Command{
......
...@@ -46,6 +46,6 @@ func TestVersion(t *testing.T) { ...@@ -46,6 +46,6 @@ func TestVersion(t *testing.T) {
} }
settings.TillerHost = "fake-localhost" settings.TillerHost = "fake-localhost"
runReleaseCases(t, tests, func(c *helm.FakeClient, out io.Writer) *cobra.Command { runReleaseCases(t, tests, func(c *helm.FakeClient, out io.Writer) *cobra.Command {
return newVersionCmd(c, out) return newVersionCmd(out)
}) })
} }
Supports Markdown
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