From 0f870277d87ecbef8de54ebc1bf007b2c1bd33de Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Tue, 1 Nov 2022 12:47:54 -0400 Subject: [PATCH] Pull build date directly from git 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 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ae5ab215039..08713958aae 100644 --- a/Makefile +++ b/Makefile @@ -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)"