diff options
Diffstat (limited to 'abuild.in')
-rw-r--r-- | abuild.in | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -30,11 +30,6 @@ fi apk_opt_wait="--wait 30" -if [ -z "$SOURCE_DATE_EPOCH" ]; then - SOURCE_DATE_EPOCH=$(date -u "+%s") -fi -export SOURCE_DATE_EPOCH - umask 022 shell_escape() { @@ -872,6 +867,11 @@ git_last_commit() { $git log --format=oneline -n 1 "$startdir" | awk '{print $1}' } +# date of last commit +git_last_commit_epoch() { + $git log -1 --format=%cd --date=unix -- "$startdir" +} + get_maintainer() { if [ -z "$maintainer" ]; then maintainer=$(awk -F': ' '/# *Maintainer/ {print $2}' "$APKBUILD") @@ -2548,6 +2548,14 @@ BUILD_ROOT= export CC CXX +if [ -z "$SOURCE_DATE_EPOCH" ]; then + SOURCE_DATE_EPOCH=$(git_last_commit_epoch) +fi +if [ -z "$SOURCE_DATE_EPOCH" ]; then + SOURCE_DATE_EPOCH=$(date -u "+%s") +fi +export SOURCE_DATE_EPOCH + cd "$startdir" || die . "$APKBUILD" |