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.
This commit is contained in:
Leonid Pliushch 2021-05-19 13:19:23 +03:00
parent c9664c11ba
commit 3337b9ffee
No known key found for this signature in database
GPG Key ID: 45F2964132545795
1 changed files with 1 additions and 1 deletions

View File

@ -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}"