Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,10 @@ ROOTDIR="$(dirname "$0")/../.."
# shellcheck source=scripts/common.sh
source "${ROOTDIR}/scripts/common.sh"

prerelease_source="${1:-ga}"

cd "${ROOTDIR}"

# shellcheck disable=SC2166
if [ "$GITHUB_REF_NAME" == "develop" ]
then
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="${prerelease_source}.%cd" >prerelease.txt
fi
# Build release version
echo -n >prerelease.txt

mkdir -p build
cd build
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/build_ems.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,10 @@ ROOTDIR="$(dirname "$0")/../.."
# shellcheck source=scripts/common.sh
source "${ROOTDIR}/scripts/common.sh"

prerelease_source="${1:-ga}"

cd "${ROOTDIR}"

# shellcheck disable=SC2166
if [ "$GITHUB_REF_NAME" == "develop" ]
then
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="${prerelease_source}.%cd" >prerelease.txt
fi
# Build release version
echo -n >prerelease.txt

# Disable warnings for unqualified `move()` calls, introduced and enabled by
# default in clang-16 which is what the emscripten docker image uses.
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/build_win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,8 @@ $ErrorActionPreference = "Stop"

cd "$PSScriptRoot\..\.."

if ($Env:GITHUB_REF_NAME -eq 'develop') {
New-Item prerelease.txt -type file
Write-Host "Building release version."
}
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=unix --format=%cd HEAD
$last_commit_date = (Get-Date -Date "1970-01-01 00:00:00Z").toUniversalTime().addSeconds($last_commit_timestamp).ToString("yyyy.M.d")
-join("ga.", $last_commit_date) | out-file -encoding ascii prerelease.txt
}
New-Item prerelease.txt -type file
Write-Host "Building release version."

mkdir build
cd build
Expand Down