Skip to content

Commit

Permalink
Reorder write to status-old.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
j-woz committed Jan 17, 2025
1 parent 4d96e2e commit 0ede81f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dev/jenkins/build-mpich.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,14 @@ log()
print ${(%)DATE_FMT_NICE} "build-mpich.sh:" ${*}
}

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

if (( $STATUS_OLD != 1 )) echo 1 > status-old.txt

# Look at timestamps left by previous runs and see if git has changed
GIT_CHANGED=1
log "New timestamp:"
Expand All @@ -69,6 +67,9 @@ if (( ! GIT_CHANGED )) {
}
print

# Assume this run will fail:
if (( $STATUS_OLD != 1 )) echo 1 > status-old.txt

# Define and reset the settings file:
SETTINGS=dev/build/swift-t-settings.sh
rm -fv $SETTINGS
Expand Down

0 comments on commit 0ede81f

Please sign in to comment.