Upgrade script does not report upgrade being complete when it actually fails.
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run

This commit is contained in:
Roland 2026-02-03 16:53:20 -07:00
parent d697fc4603
commit 9cdc0b5085
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680

View file

@ -70,10 +70,22 @@ if [ -z "$WROLPI_UPGRADE_SERVICE" ]; then
exit $EXIT_CODE
fi
# Clean up and report status on exit.
trap '
EXIT_STATUS=$?
rm -f /tmp/wrolpi-upgrade.env
if [ $EXIT_STATUS -eq 0 ]; then
echo "WROLPi upgrade has completed"
else
echo "WROLPi upgrade has FAILED (exit code: $EXIT_STATUS)"
fi
' EXIT
echo "Upgrading WROLPi from branch: ${BRANCH}"
set -x
set -e
set -o pipefail
systemctl stop wrolpi-api
systemctl stop wrolpi-app
@ -86,5 +98,3 @@ systemctl stop wrolpi-app
set +x
echo "Upgrade end $(date '+%Y-%m-%d %H:%M:%S')" >>/opt/wrolpi/upgrade.log
echo "WROLPi upgrade has completed"