abuild: fix building without git

fixes #9981
This commit is contained in:
Natanael Copa 2019-12-05 08:32:30 +00:00
parent bb0324e398
commit ec96c604e9
1 changed files with 4 additions and 0 deletions

View File

@ -105,6 +105,10 @@ want_check() {
}
set_source_date() {
# dont error out if APKBUILD is not in git
if ! $git rev-parse --show-toplevel >/dev/null 2>&1; then
git=true
fi
# set time stamp for reproducible builds
if [ -z "$ABUILD_LAST_COMMIT" ]; then
export ABUILD_LAST_COMMIT="$(git_last_commit)$(git_dirty)"