Skip to content

Commit 0ede81f

Browse files
committed
Reorder write to status-old.txt
1 parent 4d96e2e commit 0ede81f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dev/jenkins/build-mpich.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,14 @@ log()
3838
print ${(%)DATE_FMT_NICE} "build-mpich.sh:" ${*}
3939
}
4040

41-
# Assume failure in prior runs and this run until proven otherwise
41+
# Load any prior exit status codes
4242
if [[ -f status-old.txt ]] {
4343
read STATUS_OLD < status-old.txt
4444
log "prior STATUS_OLD=$STATUS_OLD"
4545
} else {
4646
STATUS_OLD=-1
4747
}
4848

49-
if (( $STATUS_OLD != 1 )) echo 1 > status-old.txt
50-
5149
# Look at timestamps left by previous runs and see if git has changed
5250
GIT_CHANGED=1
5351
log "New timestamp:"
@@ -69,6 +67,9 @@ if (( ! GIT_CHANGED )) {
6967
}
7068
print
7169

70+
# Assume this run will fail:
71+
if (( $STATUS_OLD != 1 )) echo 1 > status-old.txt
72+
7273
# Define and reset the settings file:
7374
SETTINGS=dev/build/swift-t-settings.sh
7475
rm -fv $SETTINGS

0 commit comments

Comments
 (0)