This is an automated email from the ASF dual-hosted git repository.

ccondit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-k8shim.git


The following commit(s) were added to refs/heads/master by this push:
     new 86d6748d [YUNIKORN-2420] [ADDENDUM] Shim: create reproducible binaries
86d6748d is described below

commit 86d6748db5aac1b4a3189d268d0faa006e10a401
Author: Craig Condit <[email protected]>
AuthorDate: Thu Feb 15 17:08:43 2024 -0600

    [YUNIKORN-2420] [ADDENDUM] Shim: create reproducible binaries
    
    Fix: Ensure .git exists before calling git log
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index c7afa191..031933d8 100644
--- a/Makefile
+++ b/Makefile
@@ -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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to