From 3337b9ffee40c1ff39236db50c30a10960c2873b Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Wed, 19 May 2021 13:19:23 +0300 Subject: [PATCH] build-package.sh: compatibility with "reproducible builds" Though git method of getting persistent timestamp won't work in submodules and snapshots and will fallback to current date. --- build-package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-package.sh b/build-package.sh index c1dc2829bc..a4b2b9dc1b 100755 --- a/build-package.sh +++ b/build-package.sh @@ -3,7 +3,7 @@ set -e -o pipefail -u -SOURCE_DATE_EPOCH=$(date "+%s") +SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct 2>/dev/null || date "+%s") export SOURCE_DATE_EPOCH : "${TMPDIR:=/tmp}"