Skip to content

Commit

Permalink
fix: use curl --fail-with-body flag (#9)
Browse files Browse the repository at this point in the history
Co-authored-by: John Molakvoæ <[email protected]>
  • Loading branch information
R0Wi and skjnldsv authored Jan 22, 2025
1 parent ba31708 commit 9244bb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions push_appstore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ echo "Creating new app release in Nextcloud appstore (nightly=${NIGHTLY})"
if [ ! -z $APPSTORE_TOKEN ]
then
echo "Using token authentication"
curl -s --fail --show-error -X POST $APPSTORE_URL -H "Authorization: Token ${APPSTORE_TOKEN}" -H "Content-Type: application/json" -d "{\"download\": \"${DOWNLOAD_URL}\", \"signature\": \"${sign}\", \"nightly\": ${NIGHTLY} }"
curl -s --fail-with-body --show-error -X POST $APPSTORE_URL -H "Authorization: Token ${APPSTORE_TOKEN}" -H "Content-Type: application/json" -d "{\"download\": \"${DOWNLOAD_URL}\", \"signature\": \"${sign}\", \"nightly\": ${NIGHTLY} }"
elif [ ! -z $APPSTORE_USERNAME ] && [ ! -z $APPSTORE_PASSWORD ]
then
echo "Using username password authentication"
curl -s --fail --show-error -X POST $APPSTORE_URL -u "${APPSTORE_USERNAME}:${APPSTORE_PASSWORD}" -H "Content-Type: application/json" -d "{\"download\": \"${DOWNLOAD_URL}\", \"signature\": \"${sign}\", \"nightly\": ${NIGHTLY} }"
curl -s --fail-with-body --show-error -X POST $APPSTORE_URL -u "${APPSTORE_USERNAME}:${APPSTORE_PASSWORD}" -H "Content-Type: application/json" -d "{\"download\": \"${DOWNLOAD_URL}\", \"signature\": \"${sign}\", \"nightly\": ${NIGHTLY} }"
else
echo "Authentication cannot be done. Please provide 'appstore_token' or 'appstore_username' and 'appstore_password' input variables."
exit 1
Expand Down

0 comments on commit 9244bb5

Please sign in to comment.