diff --git a/_proto/hapi/version/version.proto b/_proto/hapi/version/version.proto index 9d1b2ecf5..0ae0985b7 100644 --- a/_proto/hapi/version/version.proto +++ b/_proto/hapi/version/version.proto @@ -21,7 +21,6 @@ option go_package = "version"; message Version { // Sem ver string for the version string sem_ver = 1; - string git_version = 2; - string git_commit = 3; - string git_tree_state = 4; + string git_commit = 2; + string git_tree_state = 3; } diff --git a/cmd/helm/version.go b/cmd/helm/version.go index 58dbcc97d..9c66cea00 100644 --- a/cmd/helm/version.go +++ b/cmd/helm/version.go @@ -51,12 +51,13 @@ func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command { func (v *versionCmd) run() error { // Regardless of whether we can talk to server or not, just print the client // version. - fmt.Printf("%+v\n", version.GetVersionProto()) + cv := version.GetVersionProto() + fmt.Fprintf(v.out, "Client: {SemVer: %s GitCommit: %s}\n", cv.SemVer, cv.GitCommit) resp, err := v.client.GetVersion() if err != nil { return err } - fmt.Printf("%+v\n", resp.Version) + fmt.Fprintf(v.out, "Server: {SemVer: %s GitCommit: %s}\n", resp.Version.SemVer, resp.Version.GitCommit) return nil } diff --git a/pkg/proto/hapi/version/version.pb.go b/pkg/proto/hapi/version/version.pb.go index 0209ac7a7..7d69bf03d 100644 --- a/pkg/proto/hapi/version/version.pb.go +++ b/pkg/proto/hapi/version/version.pb.go @@ -29,9 +29,8 @@ const _ = proto.ProtoPackageIsVersion1 type Version struct { // Sem ver string for the version SemVer string `protobuf:"bytes,1,opt,name=sem_ver,json=semVer" json:"sem_ver,omitempty"` - GitVersion string `protobuf:"bytes,2,opt,name=git_version,json=gitVersion" json:"git_version,omitempty"` - GitCommit string `protobuf:"bytes,3,opt,name=git_commit,json=gitCommit" json:"git_commit,omitempty"` - GitTreeState string `protobuf:"bytes,4,opt,name=git_tree_state,json=gitTreeState" json:"git_tree_state,omitempty"` + GitCommit string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit" json:"git_commit,omitempty"` + GitTreeState string `protobuf:"bytes,3,opt,name=git_tree_state,json=gitTreeState" json:"git_tree_state,omitempty"` } func (m *Version) Reset() { *m = Version{} } @@ -44,16 +43,14 @@ func init() { } var fileDescriptor0 = []byte{ - // 161 bytes of a gzipped FileDescriptorProto + // 144 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x48, 0x2c, 0xc8, 0xd4, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x83, 0xd1, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, - 0x42, 0x3c, 0x20, 0x39, 0x3d, 0xa8, 0x98, 0x52, 0x07, 0x23, 0x17, 0x7b, 0x18, 0x84, 0x2d, 0x24, - 0xce, 0xc5, 0x5e, 0x9c, 0x9a, 0x1b, 0x0f, 0x94, 0x92, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x62, - 0x03, 0x72, 0x81, 0x92, 0x42, 0xf2, 0x5c, 0xdc, 0xe9, 0x99, 0x25, 0xf1, 0x50, 0x3d, 0x12, 0x4c, - 0x60, 0x49, 0x2e, 0xa0, 0x10, 0x4c, 0xa7, 0x2c, 0x17, 0x88, 0x17, 0x9f, 0x9c, 0x9f, 0x9b, 0x9b, - 0x59, 0x22, 0xc1, 0x0c, 0x96, 0xe7, 0x04, 0x8a, 0x38, 0x83, 0x05, 0x84, 0x54, 0xb8, 0xf8, 0x40, - 0xd2, 0x25, 0x45, 0xa9, 0xa9, 0xf1, 0xc5, 0x25, 0x89, 0x25, 0xa9, 0x12, 0x2c, 0x60, 0x25, 0x3c, - 0x40, 0xd1, 0x10, 0xa0, 0x60, 0x30, 0x48, 0xcc, 0x89, 0x33, 0x8a, 0x1d, 0x6a, 0x43, 0x12, 0x1b, - 0xd8, 0xa9, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0xb2, 0xdd, 0x0f, 0xc8, 0x00, 0x00, - 0x00, + 0x42, 0x3c, 0x20, 0x39, 0x3d, 0xa8, 0x98, 0x52, 0x3a, 0x17, 0x7b, 0x18, 0x84, 0x29, 0x24, 0xce, + 0xc5, 0x5e, 0x9c, 0x9a, 0x1b, 0x0f, 0x94, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x62, 0x03, + 0x72, 0x81, 0x92, 0x42, 0xb2, 0x5c, 0x5c, 0xe9, 0x99, 0x25, 0xf1, 0xc9, 0xf9, 0xb9, 0xb9, 0x99, + 0x25, 0x12, 0x4c, 0x60, 0x39, 0x4e, 0xa0, 0x88, 0x33, 0x58, 0x40, 0x48, 0x85, 0x8b, 0x0f, 0x24, + 0x5d, 0x52, 0x94, 0x9a, 0x1a, 0x5f, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0xc1, 0x0c, 0x56, 0xc2, 0x03, + 0x14, 0x0d, 0x01, 0x0a, 0x06, 0x83, 0xc4, 0x9c, 0x38, 0xa3, 0xd8, 0xa1, 0x76, 0x26, 0xb1, 0x81, + 0x1d, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x20, 0xcc, 0x0e, 0x1b, 0xa6, 0x00, 0x00, 0x00, } diff --git a/versioning.mk b/versioning.mk index 1245764ca..94f3ceaa8 100644 --- a/versioning.mk +++ b/versioning.mk @@ -15,7 +15,7 @@ BINARY_VERSION ?= ${GIT_TAG}-${GIT_SHA} IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME}:${DOCKER_VERSION} MUTABLE_IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${SHORT_NAME}:${MUTABLE_VERSION} -LDFLAGS += -X k8s.io/helm/pkg/version.BuildMetadata=${GIT_SHA} +LDFLAGS += -X k8s.io/helm/pkg/version.SemVer=${GIT_TAG} LDFLAGS += -X k8s.io/helm/pkg/version.GitCommit=${GIT_COMMIT} DOCKER_PUSH = docker push