fix passing gitcommit in version output

This commit is contained in:
Tomas Kral
2017-02-11 17:05:08 +01:00
parent be042c7e1f
commit 18955c63d4
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
GITCOMMIT := $(shell git rev-parse --short HEAD)
BUILD_FLAGS := -ldflags="-w -X github.com/kubernetes-incubator/kompose/version.GITCOMMIT=$(GITCOMMIT)"
BUILD_FLAGS := -ldflags="-w -X github.com/kubernetes-incubator/kompose/cmd.GITCOMMIT=$(GITCOMMIT)"
PKGS := $(shell glide novendor)
TEST_IMAGE := kompose/tests:latest
+3 -1
View File
@@ -26,7 +26,9 @@ var (
// VERSION is version number that wil be displayed when running ./kompose version
VERSION = "0.2.0"
// GITCOMMIT is hash of the commit that wil be displayed when running ./kompose version
GITCOMMIT = "64433fd"
// this will be overwritten when running build like this: go build -ldflags="-X github.com/kubernetes-incubator/kompose/cmd.GITCOMMIT=$(GITCOMMIT)"
// HEAD is default indicating that this was not set during build
GITCOMMIT = "HEAD"
)
// versionCmd represents the version command