Skip to content

Commit

Permalink
Pull build date directly from git
Browse files Browse the repository at this point in the history
Remove dependency on `date -d` which does not work on MacOS.

https://github.com/jaegertracing/jaeger/pull/3876/files#r1010648458

Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro committed Nov 1, 2022
1 parent a22d80c commit 0f87027
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ IMPORT_LOG=.import.log

GIT_SHA=$(shell git rev-parse HEAD)
GIT_CLOSEST_TAG=$(shell git describe --abbrev=0 --tags)
DATE=$(shell date -u -d @$(shell git show -s --format=%ct) +'%Y-%m-%dT%H:%M:%SZ')
DATE=$(shell TZ=UTC0 git show --quiet --date='format-local:%Y-%m-%dT%H:%M:%SZ' --format="%cd")
BUILD_INFO_IMPORT_PATH=$(JAEGER_IMPORT_PATH)/pkg/version
BUILD_INFO=-ldflags "-X $(BUILD_INFO_IMPORT_PATH).commitSHA=$(GIT_SHA) -X $(BUILD_INFO_IMPORT_PATH).latestVersion=$(GIT_CLOSEST_TAG) -X $(BUILD_INFO_IMPORT_PATH).date=$(DATE)"

Expand Down

0 comments on commit 0f87027

Please sign in to comment.