We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97b1337 commit f0fb04eCopy full SHA for f0fb04e
Makefile
@@ -295,6 +295,8 @@ VERSION := $(shell git describe --tags --always --dirty)
295
endif
296
export VERSION
297
298
+GIT_COMMIT := $(if $(SOURCE_GIT_COMMIT),$(SOURCE_GIT_COMMIT),$(shell git rev-parse HEAD))
299
+
300
ifeq ($(origin CGO_ENABLED), undefined)
301
CGO_ENABLED := 0
302
@@ -308,6 +310,7 @@ export GO_BUILD_GCFLAGS := all=-trimpath=$(PWD)
308
310
export GO_BUILD_FLAGS :=
309
311
export GO_BUILD_LDFLAGS := -s -w \
312
-X '$(VERSION_PATH).version=$(VERSION)' \
313
+-X "$(VERSION_PATH).gitCommit=$(GIT_COMMIT)" \
314
315
BINARIES=operator-controller catalogd
316
0 commit comments