Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS notarization: add automatic retry #754

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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