File tree 3 files changed +12
-3
lines changed 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 24
24
# In a non-snapshot we want the ./scripts/version.sh script to never generate a
25
25
# +dev version.
26
26
env :
27
- CODER_NO_DEV_VERSION : ${{ github.event.inputs.snapshot && '' || 'true' }}
27
+ CODER_NO_DEV_VERSION : ${{ github.event.inputs.snapshot && 'false ' || 'true' }}
28
28
29
29
jobs :
30
30
linux-windows :
Original file line number Diff line number Diff line change @@ -57,8 +57,10 @@ cdroot() {
57
57
# be sourced by other scripts.
58
58
execrelative () {
59
59
pushd " $SCRIPT_DIR " || error " Could not change directory to '$SCRIPT_DIR '"
60
- " $@ "
60
+ rc=0
61
+ " $@ " || rc=$?
61
62
popd
63
+ return $rc
62
64
}
63
65
64
66
# maybedryrun prints the given program and flags, and then, if the first
Original file line number Diff line number Diff line change @@ -20,7 +20,14 @@ version="$last_tag"
20
20
# Dev versions are denoted by the "+dev." suffix with a trailing commit short
21
21
# SHA.
22
22
if [[ " $last_tag " != " $current " ]]; then
23
- if [[ " ${CODER_NO_DEV_VERSION:- } " != " " ]]; then
23
+ if [[ " ${CODER_NO_DEV_VERSION:- } " == * t* ]]; then
24
+ # make won't exit on $(shell cmd) failures :(
25
+ if [[ " $( ps -o comm= " $PPID " || true) " == * make* ]]; then
26
+ log " ERROR: version.sh attemped to generate a dev version string when CODER_NO_DEV_VERSION was set"
27
+ kill " $PPID "
28
+ exit 1
29
+ fi
30
+
24
31
error " version.sh attemped to generate a dev version string when CODER_NO_DEV_VERSION was set"
25
32
fi
26
33
version+=" +dev.$( git rev-parse --short HEAD) "
You can’t perform that action at this time.
0 commit comments