diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 1d4bf4ea3ede2235f464435078525ec3eaa44c40..1caa4ecc50fb555783d93d4307fd95b8e61890c3 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -107,7 +107,7 @@ func newRootCmd(args []string) *cobra.Command { newUpgradeCmd(nil, out), newReleaseTestCmd(nil, out), - newVersionCmd(nil, out), + newVersionCmd(out), newCompletionCmd(out), newHomeCmd(out), diff --git a/cmd/helm/version.go b/cmd/helm/version.go index 8ddb8e120ca89436f704a20f43ad4776e5c57a1e..ffedcff6af3fb1a2b82ac287219621e9f7aa0847 100644 --- a/cmd/helm/version.go +++ b/cmd/helm/version.go @@ -22,27 +22,22 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/pkg/helm" pb "k8s.io/helm/pkg/proto/hapi/version" "k8s.io/helm/pkg/version" ) 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 -Tiller. The output will look something like this: +This will print a representation the version of Helm. +The output will look something like this: 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. - 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 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 { @@ -51,7 +46,7 @@ type versionCmd struct { template string } -func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command { +func newVersionCmd(out io.Writer) *cobra.Command { version := &versionCmd{out: out} cmd := &cobra.Command{ diff --git a/cmd/helm/version_test.go b/cmd/helm/version_test.go index 482c896af525ef3fe9aa7005625da3afcabd36c2..8c539483d5dbb1bea7219ca2e451c4fc8f10808a 100644 --- a/cmd/helm/version_test.go +++ b/cmd/helm/version_test.go @@ -46,6 +46,6 @@ func TestVersion(t *testing.T) { } settings.TillerHost = "fake-localhost" runReleaseCases(t, tests, func(c *helm.FakeClient, out io.Writer) *cobra.Command { - return newVersionCmd(c, out) + return newVersionCmd(out) }) }