Skip to content

Commit

Permalink
Use --wait flag to wait for notarization of the Tuist App (tuist#7240)
Browse files Browse the repository at this point in the history
  • Loading branch information
fortmarek authored Jan 13, 2025
1 parent e4c830c commit ef3a18b
Showing 1 changed file with 2 additions and 32 deletions.
34 changes: 2 additions & 32 deletions .mise/tasks/bundle/app
Original file line number Diff line number Diff line change
Expand Up @@ -63,43 +63,13 @@ BUILD_DMG_PATH=$BUILD_ARTIFACTS_DIRECTORY/Tuist.dmg
create-dmg --background $MISE_PROJECT_ROOT/assets/dmg-background.png --hide-extension "Tuist.app" --icon "Tuist.app" 139 161 --icon-size 95 --window-size 605 363 --app-drop-link 467 161 --volname "Tuist App" "$BUILD_DMG_PATH" "$BUILD_DIRECTORY_BINARY"
codesign --force --timestamp --options runtime --sign "Developer ID Application: Tuist GmbH (U6LC622NKF)" --identifier "io.tuist.app.tuist-app-dmg" "$BUILD_DMG_PATH"

SUBMISSION_ID=$(xcrun notarytool submit "${BUILD_DMG_PATH}" \
xcrun notarytool submit "${BUILD_DMG_PATH}" \
--wait \
--apple-id "$APPLE_ID" \
--team-id "$TEAM_ID" \
--password "$APP_SPECIFIC_PASSWORD" \
--output-format json | jq -r '.id')

while true; do
STATUS=$(xcrun notarytool info "$SUBMISSION_ID" \
--apple-id "$APPLE_ID" \
--team-id "$TEAM_ID" \
--password "$APP_SPECIFIC_PASSWORD" \
--output-format json | jq -r '.status')

case $STATUS in
"Accepted")
echo -e "${GREEN}Notarization succeeded!${NC}"
break
;;
"In Progress")
print_status "Notarization in progress... waiting 30 seconds"
sleep 30
;;
"Invalid"|"Rejected")
echo "Notarization failed with status: $STATUS"
xcrun notarytool log "$SUBMISSION_ID" \
--apple-id "$APPLE_ID" \
--team-id "$TEAM_ID" \
--password "$APP_SPECIFIC_PASSWORD"
exit 1
;;
*)
echo "Unknown status: $STATUS"
exit 1
;;
esac
done

# Generating shasums
print_status "Generating shasums..."
for file in "$BUILD_ARTIFACTS_DIRECTORY"/*; do
Expand Down

0 comments on commit ef3a18b

Please sign in to comment.