Skip to content

Commit

Permalink
Debugging code signing and notarization
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed Jan 10, 2025
1 parent 3138f80 commit 4e837e2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
15 changes: 12 additions & 3 deletions build/ci/macos/notarize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@ echo "Uploading to apple to notarize..."

for i in 1 2 3; do
c=0
xcrun notarytool submit \
set -o pipefail
(xcrun notarytool submit $ARTIFACTS_DIR/$ARTIFACT_NAME \
--apple-id $APPLE_USERNAME \
--team-id $APPLE_TEAM_ID \
--password $APPLE_PASSWORD \
--wait $ARTIFACTS_DIR/$ARTIFACT_NAME \
--team-id $APPLE_TEAM_ID \
--wait \
| tee -a notarytool_log.txt) \
|| c=$?
set +o pipefail
if [ $c -eq 0 ]; then break; fi
if [ $i -eq 3 ]; then
echo "notarytool failed; exiting after 3 retries."
Expand All @@ -47,6 +50,12 @@ for i in 1 2 3; do
echo "notarytool failed; retrying in 30s"
sleep 30
done
xcrun notarytool log $(awk '/id:/ { print $2; exit}' notarytool_log.txt) \
--apple-id $APPLE_USERNAME \
--password $APPLE_PASSWORD \
--team-id $APPLE_TEAM_ID \
notary_extra_log.json
jq "." notary_extra_log.json || cat notary_extra_log.json

echo "Stapling and running packaging up"
xcrun stapler staple $ARTIFACTS_DIR/$ARTIFACT_NAME
Expand Down
3 changes: 2 additions & 1 deletion build/package_mac
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,10 @@ find "${VOLUME}/${LONGER_NAME}.app/Contents/Resources" -name '*.dylib' -exec cod
# Sign code in other (more conventional) locations
codesign --force --options runtime --entitlements "${WORKING_DIRECTORY}/../build/macosx_entitlements.plist" --deep -s "Developer ID Application: ${DEVELOPER_NAME}" "${CODE_PATHS[@]}"
echo "spctl"
spctl --assess --type execute "${VOLUME}/${LONGER_NAME}.app"
spctl --assess --type execute --verbose=4 --ignore-cache --no-cache "${VOLUME}/${LONGER_NAME}.app"
echo "Codesign verify"
codesign --verify --deep --strict --verbose=2 "${CODE_PATHS[@]}"
codesign -d -vvv "${CODE_PATHS[@]}"

echo "Unmount"
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
Expand Down

0 comments on commit 4e837e2

Please sign in to comment.