Skip to content

Commit

Permalink
macOS notarization: add automatic retry
Browse files Browse the repository at this point in the history
Backport of musescore#25996
  • Loading branch information
cbjeukendrup authored and Jojo-Schmitz committed Jan 10, 2025
1 parent 7a2114a commit 257baa0
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion build/ci/macos/notarize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,22 @@ echo "ARTIFACT_NAME: $ARTIFACT_NAME"

echo "Uploading to apple to notarize..."

xcrun notarytool submit --apple-id $APPLE_USERNAME --team-id $APPLE_TEAM_ID --password $APPLE_PASSWORD --wait $ARTIFACTS_DIR/$ARTIFACT_NAME
for i in 1 2 3; do
c=0
xcrun notarytool submit \
--apple-id $APPLE_USERNAME \
--team-id $APPLE_TEAM_ID \
--password $APPLE_PASSWORD \
--wait $ARTIFACTS_DIR/$ARTIFACT_NAME \
|| c=$?
if [ $c -eq 0 ]; then break; fi
if [ $i -eq 3 ]; then
echo "notarytool failed; exiting after 3 retries."
exit 1
fi
echo "notarytool failed; retrying in 30s"
sleep 30
done

echo "Stapling and running packaging up"
xcrun stapler staple $ARTIFACTS_DIR/$ARTIFACT_NAME
Expand Down

0 comments on commit 257baa0

Please sign in to comment.