fix evil bug with exit ${HTTP_CODE}

This commit is contained in:
sappho 2025-09-26 19:58:16 -04:00 committed by GitHub
parent 8e1294c43f
commit 173a8cab2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -155,7 +155,9 @@ jobs:
HTTP_CODE=$(curl -XPOST -H "Authorization: Basic ${AUTHORIZATION}" -H "Content-Type: application/zip" --output /dev/null --silent --write-out "%{http_code}" --data-binary "@${{ env.ZIP_FILENAME }}" "https://builds.limetech.io/upload.php?project=${{ env.PROJECT }}&filename=${{ env.ZIP_FILENAME }}")
if test ${HTTP_CODE} -ne 200; then
exit ${HTTP_CODE}
echo "server returned HTTP status ${HTTP_CODE}!!"
exit 254
# we can not exit ${HTTP_CODE}, bash only goes up to a maximum of exit 255, and http has more codes than that!
fi
echo "Upload successful!"