build_win.ps1: Use commit date for CI builds on Windows and Emscripten as well

This commit is contained in:
Kamil Śliwak
2021-01-14 22:23:06 +01:00
parent 6c3ccc8e29
commit 71d19c5178
2 changed files with 15 additions and 2 deletions
+7 -2
View File
@@ -47,11 +47,16 @@ cd $WORKSPACE
# shellcheck disable=SC2166
if [[ "$CIRCLE_BRANCH" = release || -n "$CIRCLE_TAG" || -n "$FORCE_RELEASE" || "$(git tag --points-at HEAD 2>/dev/null)" == v* ]]
then
echo -n >prerelease.txt
echo -n >prerelease.txt
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.
TZ=UTC git show --quiet --date="format-local:%Y.%-m.%-d" --format="ci.%cd" >prerelease.txt
fi
if [ -n "$CIRCLE_SHA1" ]
then
echo -n "$CIRCLE_SHA1" >commit_hash.txt
echo -n "$CIRCLE_SHA1" >commit_hash.txt
fi
mkdir -p $BUILD_DIR