Skip to content

Commit 275b679

Browse files
committed
fix: fetch notarization log on failure for debugging
1 parent 49256bf commit 275b679

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

scripts/build-release.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,12 +585,22 @@ if [ "$NOTARIZE" = "true" ]; then
585585
ditto -c -k --keepParent "$app" "$zip_path"
586586

587587
echo " Submitting $name for notarization..."
588-
if xcrun notarytool submit "$zip_path" --keychain-profile "TablePro" --wait; then
588+
submit_output=$(xcrun notarytool submit "$zip_path" --keychain-profile "TablePro" --wait 2>&1)
589+
submit_status=$?
590+
echo "$submit_output"
591+
592+
submission_id=$(echo "$submit_output" | grep "id:" | head -1 | awk '{print $2}')
593+
594+
if [ $submit_status -eq 0 ] && echo "$submit_output" | grep -q "status: Accepted"; then
589595
echo " Stapling $name..."
590596
xcrun stapler staple "$app"
591597
echo "$name notarized and stapled"
592598
else
593599
echo " ❌ Notarization failed for $name"
600+
if [ -n "$submission_id" ]; then
601+
echo " 📋 Fetching notarization log for $submission_id..."
602+
xcrun notarytool log "$submission_id" --keychain-profile "TablePro" 2>&1 || true
603+
fi
594604
exit 1
595605
fi
596606
rm -f "$zip_path"

0 commit comments

Comments
 (0)