diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index ad152bcbdca9..fd0a79906b1a 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -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 diff --git a/.github/workflows/build_ems.sh b/.github/workflows/build_ems.sh index 5429da5fb016..d1de130dff1b 100755 --- a/.github/workflows/build_ems.sh +++ b/.github/workflows/build_ems.sh @@ -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. diff --git a/.github/workflows/build_win.ps1 b/.github/workflows/build_win.ps1 index a3dd01dc3549..8b9fcaa5d66c 100644 --- a/.github/workflows/build_win.ps1 +++ b/.github/workflows/build_win.ps1 @@ -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