diff --git a/push_appstore.sh b/push_appstore.sh index f3a88e8..f23c297 100755 --- a/push_appstore.sh +++ b/push_appstore.sh @@ -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