Skip to content

Commit a4a86c5

Browse files
Merge pull request #99 from yanghang8612/build_release_version
Directly build release version for all jobs
2 parents 1d19e75 + 945d096 commit a4a86c5

File tree

3 files changed

+6
-36
lines changed

3 files changed

+6
-36
lines changed

.github/workflows/build.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,10 @@ ROOTDIR="$(dirname "$0")/../.."
55
# shellcheck source=scripts/common.sh
66
source "${ROOTDIR}/scripts/common.sh"
77

8-
prerelease_source="${1:-ga}"
9-
108
cd "${ROOTDIR}"
119

12-
# shellcheck disable=SC2166
13-
if [ "$GITHUB_REF_NAME" == "develop" ]
14-
then
15-
echo -n >prerelease.txt
16-
else
17-
# Use last commit date rather than build date to avoid ending up with builds for
18-
# different platforms having different version strings (and therefore producing different bytecode)
19-
# if the CI is triggered just before midnight.
20-
TZ=UTC git show --quiet --date="format-local:%Y.%-m.%-d" --format="${prerelease_source}.%cd" >prerelease.txt
21-
fi
10+
# Build release version
11+
echo -n >prerelease.txt
2212

2313
mkdir -p build
2414
cd build

.github/workflows/build_ems.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,10 @@ ROOTDIR="$(dirname "$0")/../.."
55
# shellcheck source=scripts/common.sh
66
source "${ROOTDIR}/scripts/common.sh"
77

8-
prerelease_source="${1:-ga}"
9-
108
cd "${ROOTDIR}"
119

12-
# shellcheck disable=SC2166
13-
if [ "$GITHUB_REF_NAME" == "develop" ]
14-
then
15-
echo -n >prerelease.txt
16-
else
17-
# Use last commit date rather than build date to avoid ending up with builds for
18-
# different platforms having different version strings (and therefore producing different bytecode)
19-
# if the CI is triggered just before midnight.
20-
TZ=UTC git show --quiet --date="format-local:%Y.%-m.%-d" --format="${prerelease_source}.%cd" >prerelease.txt
21-
fi
10+
# Build release version
11+
echo -n >prerelease.txt
2212

2313
# Disable warnings for unqualified `move()` calls, introduced and enabled by
2414
# default in clang-16 which is what the emscripten docker image uses.

.github/workflows/build_win.ps1

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,8 @@ $ErrorActionPreference = "Stop"
22

33
cd "$PSScriptRoot\..\.."
44

5-
if ($Env:GITHUB_REF_NAME -eq 'develop') {
6-
New-Item prerelease.txt -type file
7-
Write-Host "Building release version."
8-
}
9-
else {
10-
# Use last commit date rather than build date to avoid ending up with builds for
11-
# different platforms having different version strings (and therefore producing different bytecode)
12-
# if the CI is triggered just before midnight.
13-
$last_commit_timestamp = git log -1 --date=unix --format=%cd HEAD
14-
$last_commit_date = (Get-Date -Date "1970-01-01 00:00:00Z").toUniversalTime().addSeconds($last_commit_timestamp).ToString("yyyy.M.d")
15-
-join("ga.", $last_commit_date) | out-file -encoding ascii prerelease.txt
16-
}
5+
New-Item prerelease.txt -type file
6+
Write-Host "Building release version."
177

188
mkdir build
199
cd build

0 commit comments

Comments
 (0)