diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /workhorse/Makefile | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'workhorse/Makefile')
-rw-r--r-- | workhorse/Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/workhorse/Makefile b/workhorse/Makefile index 2bfaf5913c6..0e8c47ae35c 100644 --- a/workhorse/Makefile +++ b/workhorse/Makefile @@ -6,7 +6,12 @@ VERSION_STRING := $(shell git describe) ifeq ($(strip $(VERSION_STRING)),) VERSION_STRING := v$(shell cat VERSION) endif -BUILD_TIME := $(shell date -u +%Y%m%d.%H%M%S) +DATE_FMT = +%Y%m%d.%H%M%S +ifdef SOURCE_DATE_EPOCH + BUILD_TIME := $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)") +else + BUILD_TIME := $(shell date -u "$(DATE_FMT)") +endif GOBUILD := go build -ldflags "-X main.Version=$(VERSION_STRING) -X main.BuildTime=$(BUILD_TIME)" EXE_ALL := gitlab-resize-image gitlab-zip-cat gitlab-zip-metadata gitlab-workhorse INSTALL := install |