Skip to content

Commit

Permalink
[YUNIKORN-2420] [ADDENDUM] Shim: create reproducible binaries
Browse files Browse the repository at this point in the history
Fix: Ensure .git exists before calling git log
  • Loading branch information
craigcondit committed Feb 15, 2024
1 parent 112c083 commit 86d6748
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 @@ -76,7 +76,7 @@ endif

# Build date - Use git commit, then cached build.date, finally current date
# This allows for reproducible builds as long as release tarball contains the build.date file.
DATE := $(shell TZ=UTC0 git --no-pager log -1 --date=iso8601-strict-local --format=%cd 2>/dev/null || true)
DATE := $(shell if [ -d "$(BASE_DIR)/.git" ]; then TZ=UTC0 git --no-pager log -1 --date=iso8601-strict-local --format=%cd 2>/dev/null ; fi || true)
ifeq ($(DATE),)
DATE := $(shell cat "$(BASE_DIR)/build.date" 2>/dev/null || true)
endif
Expand Down

0 comments on commit 86d6748

Please sign in to comment.