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 dd4f780 commit 0cb7ec3Copy full SHA for 0cb7ec3
Makefile
@@ -290,6 +290,8 @@ VERSION := $(shell git describe --tags --always --dirty)
290
endif
291
export VERSION
292
293
+GIT_COMMIT := $(if $(SOURCE_GIT_COMMIT),$(SOURCE_GIT_COMMIT),$(shell git rev-parse HEAD))
294
+
295
ifeq ($(origin CGO_ENABLED), undefined)
296
CGO_ENABLED := 0
297
@@ -303,6 +305,7 @@ export GO_BUILD_GCFLAGS := all=-trimpath=$(PWD)
303
305
export GO_BUILD_FLAGS :=
304
306
export GO_BUILD_LDFLAGS := -s -w \
307
-X '$(VERSION_PATH).version=$(VERSION)' \
308
+ -X "$(VERSION_PATH).gitCommit=$(GIT_COMMIT)" \
309
310
BINARIES=operator-controller
311
0 commit comments