Skip to content

Commit 20440f8

Browse files
authored
Attempt to not notarize so much (#25515)
https://developer.apple.com/forums/thread/718583 suggests that if you staple a dmg, then the ticket is copied along with the app when you copy it out of the dmg. Closes #ISSUE Release Notes: - N/A
1 parent 2d63f76 commit 20440f8

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

script/bundle-mac

+2-19
Original file line numberDiff line numberDiff line change
@@ -313,24 +313,6 @@ function sign_app_binaries() {
313313
mv "${app_path}" "${dmg_source_directory}"
314314
notarization_key_file=$(mktemp)
315315

316-
if [[ $can_code_sign = true ]]; then
317-
echo "Creating temporary DMG at ${dmg_file_path} using ${dmg_source_directory} to notarize app bundle"
318-
hdiutil create -volname Zed -srcfolder "${dmg_source_directory}" -ov -format UDZO "${dmg_file_path}"
319-
320-
echo "Code-signing DMG"
321-
/usr/bin/codesign --deep --force --timestamp --options runtime --sign "$IDENTITY" "$(pwd)/${dmg_file_path}" -v
322-
323-
echo "Notarizing DMG with Apple"
324-
echo "$APPLE_NOTARIZATION_KEY" > "$notarization_key_file"
325-
"${xcode_bin_dir_path}/notarytool" submit --wait --key "$notarization_key_file" --key-id "$APPLE_NOTARIZATION_KEY_ID" --issuer "$APPLE_NOTARIZATION_ISSUER_ID" "${dmg_file_path}"
326-
327-
echo "Removing temporary DMG (used only for notarization)"
328-
rm "${dmg_file_path}"
329-
330-
echo "Stapling notarization ticket to ${dmg_source_directory}/${bundle_name}"
331-
"${xcode_bin_dir_path}/stapler" staple "${dmg_source_directory}/${bundle_name}"
332-
fi
333-
334316
echo "Adding symlink to /Applications to ${dmg_source_directory}"
335317
ln -s /Applications ${dmg_source_directory}
336318

@@ -349,9 +331,10 @@ function sign_app_binaries() {
349331
if [[ $can_code_sign = true ]]; then
350332
echo "Notarizing DMG with Apple"
351333
/usr/bin/codesign --deep --force --timestamp --options runtime --sign "$IDENTITY" "$(pwd)/${dmg_file_path}" -v
334+
echo "$APPLE_NOTARIZATION_KEY" > "$notarization_key_file"
352335
"${xcode_bin_dir_path}/notarytool" submit --wait --key "$notarization_key_file" --key-id "$APPLE_NOTARIZATION_KEY_ID" --issuer "$APPLE_NOTARIZATION_ISSUER_ID" "${dmg_file_path}"
353-
"${xcode_bin_dir_path}/stapler" staple "${dmg_file_path}"
354336
rm "$notarization_key_file"
337+
"${xcode_bin_dir_path}/stapler" staple "${dmg_file_path}"
355338
fi
356339

357340
if [ "$open_result" = true ]; then

0 commit comments

Comments
 (0)