Skip to content

Commit e03471a

Browse files
committed
Debugging code signing and notarization
1 parent d3a54bd commit e03471a

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

build/ci/macos/notarize.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ echo "Uploading to apple to notarize..."
3333

3434
for i in 1 2 3; do
3535
c=0
36-
xcrun notarytool submit \
36+
set -o pipefail
37+
(xcrun notarytool submit $ARTIFACTS_DIR/$ARTIFACT_NAME \
3738
--apple-id $APPLE_USERNAME \
38-
--team-id $APPLE_TEAM_ID \
3939
--password $APPLE_PASSWORD \
40-
--wait $ARTIFACTS_DIR/$ARTIFACT_NAME \
40+
--team-id $APPLE_TEAM_ID \
41+
--wait \
42+
| tee -a notarytool_log.txt) \
4143
|| c=$?
44+
set +o pipefail
4245
if [ $c -eq 0 ]; then break; fi
4346
if [ $i -eq 3 ]; then
4447
echo "notarytool failed; exiting after 3 retries."
@@ -47,6 +50,12 @@ for i in 1 2 3; do
4750
echo "notarytool failed; retrying in 30s"
4851
sleep 30
4952
done
53+
xcrun notarytool log $(awk '/id:/ { print $2; exit}' notarytool_log.txt) \
54+
--apple-id $APPLE_USERNAME \
55+
--password $APPLE_PASSWORD \
56+
--team-id $APPLE_TEAM_ID \
57+
notary_extra_log.json
58+
jq "." notary_extra_log.json || cat notary_extra_log.json
5059

5160
echo "Stapling and running packaging up"
5261
xcrun stapler staple $ARTIFACTS_DIR/$ARTIFACT_NAME

build/package_mac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,10 @@ find "${VOLUME}/${LONGER_NAME}.app/Contents/Resources" -name '*.dylib' -exec cod
199199
# Sign code in other (more conventional) locations
200200
codesign --force --options runtime --entitlements "${WORKING_DIRECTORY}/../build/macosx_entitlements.plist" --deep -s "Developer ID Application: ${DEVELOPER_NAME}" "${CODE_PATHS[@]}"
201201
echo "spctl"
202-
spctl --assess --type execute "${VOLUME}/${LONGER_NAME}.app"
202+
spctl --assess --type execute --verbose=4 --ignore-cache --no-cache "${VOLUME}/${LONGER_NAME}.app"
203203
echo "Codesign verify"
204204
codesign --verify --deep --strict --verbose=2 "${CODE_PATHS[@]}"
205+
codesign -d -vvv "${CODE_PATHS[@]}"
205206

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

0 commit comments

Comments
 (0)