forked from LaconicNetwork/kompose
Merge pull request #423 from kadel/fix-version-gitcommit
fix passing gitcommit in version output
This commit is contained in:
commit
f918d51cc1
2
Makefile
2
Makefile
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
|
|
||||||
GITCOMMIT := $(shell git rev-parse --short HEAD)
|
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)
|
PKGS := $(shell glide novendor)
|
||||||
TEST_IMAGE := kompose/tests:latest
|
TEST_IMAGE := kompose/tests:latest
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,9 @@ var (
|
|||||||
// VERSION is version number that wil be displayed when running ./kompose version
|
// VERSION is version number that wil be displayed when running ./kompose version
|
||||||
VERSION = "0.2.0"
|
VERSION = "0.2.0"
|
||||||
// GITCOMMIT is hash of the commit that wil be displayed when running ./kompose version
|
// 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
|
// versionCmd represents the version command
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user