pull/775/merge
Aaron Schlesinger 9 years ago
commit 1bfea2a03e

@ -2,13 +2,15 @@ DOCKER_REGISTRY ?= gcr.io
IMAGE_PREFIX ?= kubernetes-helm
SHORT_NAME ?= tiller
CLI_VERSION ?= devel
# go option
GO ?= go
PKG := $(shell glide novendor)
TAGS :=
TESTS := .
TESTFLAGS :=
LDFLAGS :=
LDFLAGS := -X cmd.helm.cliVersion=${CLI_VERSION}
GOFLAGS :=
BINDIR := $(CURDIR)/bin
BINARIES := helm tiller

@ -0,0 +1,30 @@
package main
import (
"fmt"
"github.com/spf13/cobra"
)
var (
versionHelp = "This command prints out the current version of the Helm CLI."
// this variable is set by the Makefile, using the Go linker flags
cliVersion = "devel"
)
var versionCommand = &cobra.Command{
Use: "version",
Short: "Get the current version of Helm",
Long: versionHelp,
RunE: versionCmd,
Aliases: []string{"vsn"},
}
func init() {
RootCommand.AddCommand(versionCommand)
}
func versionCmd(cmd *cobra.Command, args []string) error {
fmt.Println("Helm CLI version", cliVersion)
return nil
}
Loading…
Cancel
Save