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 @@ -308,8 +308,6 @@ VERSION := $(shell git describe --tags --always --dirty)
308
308
endif
309
309
export VERSION
310
310
311
- GIT_COMMIT := $(if $(SOURCE_GIT_COMMIT ) ,$(SOURCE_GIT_COMMIT ) ,$(shell git rev-parse HEAD) )
312
-
313
311
ifeq ($(origin CGO_ENABLED ) , undefined)
314
312
CGO_ENABLED := 0
315
313
endif
@@ -323,7 +321,7 @@ export GO_BUILD_GCFLAGS := all=-trimpath=$(PWD)
323
321
export GO_BUILD_FLAGS :=
324
322
export GO_BUILD_LDFLAGS := -s -w \
325
323
-X '$(VERSION_PATH ) .version=$(VERSION ) ' \
326
- -X " $(VERSION_PATH ) .gitCommit=$(GIT_COMMIT ) " \
324
+ -X ' $(VERSION_PATH ) .gitCommit=$(GIT_COMMIT ) ' \
327
325
328
326
BINARIES =operator-controller catalogd
329
327
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