From 6c3ccc8e29330788629f83b23dd8c89dcbc3e79f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 14 Jan 2021 18:42:48 +0100 Subject: [PATCH] ci/build.sh: Use a more portable command for getting the date to make it work on macOS too --- scripts/ci/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index 033eb38b0..87138fb05 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -12,8 +12,7 @@ else # Use last commit date rather than build date to avoid ending up with builds for # different platforms having different version strings (and therefore producing different bytecode) # if the CI is triggered just before midnight. - last_commit_timestamp=$(git log -1 --date=iso --format=%ad HEAD) - date -d "$last_commit_timestamp" -u "+ci.%Y.%-m.%-d" >prerelease.txt + TZ=UTC git show --quiet --date="format-local:%Y.%-m.%-d" --format="ci.%cd" >prerelease.txt fi if [ -n "$CIRCLE_SHA1" ]