File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -295,8 +295,6 @@ VERSION := $(shell git describe --tags --always --dirty)
295295endif
296296export VERSION
297297
298- GIT_COMMIT := $(if $(SOURCE_GIT_COMMIT ) ,$(SOURCE_GIT_COMMIT ) ,$(shell git rev-parse HEAD) )
299-
300298ifeq ($(origin CGO_ENABLED ) , undefined)
301299CGO_ENABLED := 0
302300endif
@@ -310,7 +308,7 @@ export GO_BUILD_GCFLAGS := all=-trimpath=$(PWD)
310308export GO_BUILD_FLAGS :=
311309export GO_BUILD_LDFLAGS := -s -w \
312310 -X '$(VERSION_PATH ) .version=$(VERSION ) ' \
313- -X " $(VERSION_PATH ) .gitCommit=$(GIT_COMMIT ) " \
311+ -X ' $(VERSION_PATH ) .gitCommit=$(GIT_COMMIT ) ' \
314312
315313BINARIES =operator-controller catalogd
316314
Original file line number Diff line number Diff line change 66)
77
88var (
9- gitCommit = "unknown "
9+ gitCommit = ""
1010 commitDate = "unknown"
1111 repoState = "unknown"
1212 version = "unknown"
@@ -29,7 +29,9 @@ func init() {
2929 for _ , setting := range info .Settings {
3030 switch setting .Key {
3131 case "vcs.revision" :
32- gitCommit = setting .Value
32+ if gitCommit == "" {
33+ gitCommit = setting .Value
34+ }
3335 case "vcs.time" :
3436 commitDate = setting .Value
3537 case "vcs.modified" :
You can’t perform that action at this time.
0 commit comments