Skip to content

Commit

Permalink
Check build exit status and return that instead of blindly succeeding.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfeit-internet2 committed Oct 12, 2023
1 parent 72552a7 commit b1d4c52
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,17 @@ ${ECHO} ${SUDO} docker run \
|| STATUS=$?

# Docker exits with a 130 when systemd is stopped with SIGINT (halt).
# Anything else was a container problem, not a result of the build.
[ $STATUS -eq 0 -o $STATUS -eq 130 ] || false

# Check on the status of the build
STATUS_FILE="${BUILD_DIR}/DOSB/status"

[ -e "${STATUS_FILE}" ] || die "Build produced no status."

BUILD_STATUS=$(cat "${STATUS_FILE}")
if [ "${BUILD_STATUS}" -ne 0 ]
then
echo "Build failed" 1>&2
exit "${BUILD_STATUS}"
fi

0 comments on commit b1d4c52

Please sign in to comment.