File tree 2 files changed +5
-5
lines changed
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)
295
295
endif
296
296
export VERSION
297
297
298
- GIT_COMMIT := $(if $(SOURCE_GIT_COMMIT ) ,$(SOURCE_GIT_COMMIT ) ,$(shell git rev-parse HEAD) )
299
-
300
298
ifeq ($(origin CGO_ENABLED ) , undefined)
301
299
CGO_ENABLED := 0
302
300
endif
@@ -310,7 +308,7 @@ export GO_BUILD_GCFLAGS := all=-trimpath=$(PWD)
310
308
export GO_BUILD_FLAGS :=
311
309
export GO_BUILD_LDFLAGS := -s -w \
312
310
-X '$(VERSION_PATH ) .version=$(VERSION ) ' \
313
- -X " $(VERSION_PATH ) .gitCommit=$(GIT_COMMIT ) " \
311
+ -X ' $(VERSION_PATH ) .gitCommit=$(GIT_COMMIT ) ' \
314
312
315
313
BINARIES =operator-controller catalogd
316
314
Original file line number Diff line number Diff line change 6
6
)
7
7
8
8
var (
9
- gitCommit = "unknown "
9
+ gitCommit = ""
10
10
commitDate = "unknown"
11
11
repoState = "unknown"
12
12
version = "unknown"
@@ -29,7 +29,9 @@ func init() {
29
29
for _ , setting := range info .Settings {
30
30
switch setting .Key {
31
31
case "vcs.revision" :
32
- gitCommit = setting .Value
32
+ if gitCommit == "" {
33
+ gitCommit = setting .Value
34
+ }
33
35
case "vcs.time" :
34
36
commitDate = setting .Value
35
37
case "vcs.modified" :
You can’t perform that action at this time.
0 commit comments