File tree Expand file tree Collapse file tree 5 files changed +22
-26
lines changed Expand file tree Collapse file tree 5 files changed +22
-26
lines changed Original file line number Diff line number Diff line change @@ -186,15 +186,7 @@ commands:
186186 steps :
187187 - run :
188188 name : Store prerelease suffix
189- command : |
190- if [[ -n "$CIRCLE_TAG" || -n "$FORCE_RELEASE" ]]; then
191- echo -n > prerelease.txt
192- else
193- # Use last commit date rather than build date to avoid ending up with builds for
194- # different platforms having different version strings (and therefore producing different bytecode)
195- # if the CI is triggered just before midnight.
196- TZ=UTC git show --quiet --date="format-local:%Y.%-m.%-d" --format="nightly.%cd" > prerelease.txt
197- fi
189+ command : " scripts/prerelease_suffix.sh" nightly "$CIRCLE_TAG" > prerelease.txt
198190
199191 install_and_check_minimum_requirements :
200192 parameters :
Original file line number Diff line number Diff line change 1010 BUILD_TYPE=" $1 "
1111fi
1212
13- if [[ $( git tag --points-at HEAD 2> /dev/null) == v * ]]; then
13+ if [[ $( git tag --points-at HEAD 2> /dev/null) =~ ^v[0-9.]+$ ]]; then
1414 echo -n > prerelease.txt
1515fi
1616
Original file line number Diff line number Diff line change @@ -9,14 +9,7 @@ prerelease_source="${1:-ci}"
99
1010cd " ${ROOTDIR} "
1111
12- if [[ -n $CIRCLE_TAG || -n $FORCE_RELEASE ]]; then
13- echo -n > prerelease.txt
14- else
15- # Use last commit date rather than build date to avoid ending up with builds for
16- # different platforms having different version strings (and therefore producing different bytecode)
17- # if the CI is triggered just before midnight.
18- TZ=UTC git show --quiet --date=" format-local:%Y.%-m.%-d" --format=" ${prerelease_source} .%cd" > prerelease.txt
19- fi
12+ " ${ROOTDIR} /scripts/prerelease_suffix.sh" " $prerelease_source " " $CIRCLE_TAG " > prerelease.txt
2013
2114mkdir -p build
2215cd build
Original file line number Diff line number Diff line change @@ -45,14 +45,7 @@ function build() {
4545
4646 cd " ${ROOT_DIR} "
4747
48- if [[ -n $CIRCLE_TAG || -n $FORCE_RELEASE || $( git tag --points-at HEAD 2> /dev/null) == v* ]]; then
49- echo -n > prerelease.txt
50- else
51- # Use last commit date rather than build date to avoid ending up with builds for
52- # different platforms having different version strings (and therefore producing different bytecode)
53- # if the CI is triggered just before midnight.
54- TZ=UTC git show --quiet --date=" format-local:%Y.%-m.%-d" --format=" ${prerelease_source} .%cd" > prerelease.txt
55- fi
48+ " ${SCRIPT_DIR} /prerelease_suffix.sh" " $prerelease_source " " $( git tag --points-at HEAD 2> /dev/null) "
5649
5750 # Disable warnings for unqualified `move()` calls, introduced and enabled by
5851 # default in clang-16 which is what the emscripten docker image uses.
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ (( $# <= 2 )) || { >&2 echo " Usage: $0 [PRERELEASE_SOURCE] [GIT_TAG]" ; exit 1; }
5+ prerelease_source=" ${1:- nightly} "
6+ git_tag=" ${2:- } "
7+ FORCE_RELEASE=" ${FORCE_RELEASE:- } "
8+
9+ if [[ $FORCE_RELEASE != " " || $git_tag =~ ^v[0-9.]+$ ]]; then
10+ echo -n
11+ elif [[ $git_tag =~ ^v[0-9.]+-pre. ]]; then
12+ echo -n " pre.${git_tag#* -pre.} "
13+ else
14+ # Use last commit date rather than build date to avoid ending up with builds for
15+ # different platforms having different version strings (and therefore producing different bytecode)
16+ # if the CI is triggered just before midnight.
17+ TZ=UTC git show --quiet --date=" format-local:%Y.%-m.%-d" --format=" ${prerelease_source} .%cd"
18+ fi
You can’t perform that action at this time.
0 commit comments