Skip to content

Commit 9aa4318

Browse files
committed
fix: Handle non-200 responses in App Store registration check
The App Store API can return 500 for unregistered apps, not just 404. Now attempts registration for any non-200 response.
1 parent 54314e5 commit 9aa4318

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/release-beta.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ jobs:
279279
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
280280
"https://apps.nextcloud.com/api/v1/apps/${{ inputs.app-name }}")
281281
282-
if [ "$HTTP_CODE" = "404" ]; then
283-
echo "App not registered yet — registering ${{ inputs.app-name }} on App Store..."
282+
if [ "$HTTP_CODE" != "200" ]; then
283+
echo "App not registered or not reachable (HTTP $HTTP_CODE) — attempting to register ${{ inputs.app-name }}..."
284284
285285
# Sign the app ID with the signing key
286286
SIGNATURE=$(echo -n "${{ inputs.app-name }}" | openssl dgst -sha512 -sign signing-key.key | openssl base64 -A)

.github/workflows/release-stable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ jobs:
301301
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
302302
"https://apps.nextcloud.com/api/v1/apps/${{ inputs.app-name }}")
303303
304-
if [ "$HTTP_CODE" = "404" ]; then
305-
echo "App not registered yet — registering ${{ inputs.app-name }} on App Store..."
304+
if [ "$HTTP_CODE" != "200" ]; then
305+
echo "App not registered or not reachable (HTTP $HTTP_CODE) — attempting to register ${{ inputs.app-name }}..."
306306
307307
# Sign the app ID with the signing key
308308
SIGNATURE=$(echo -n "${{ inputs.app-name }}" | openssl dgst -sha512 -sign signing-key.key | openssl base64 -A)

0 commit comments

Comments
 (0)