11#! /bin/bash
2- # Dory release pipeline: archive -> export ( Developer ID) -> notarize -> staple -> zip.
2+ # Dory release pipeline: archive + Developer ID sign -> notarize -> staple -> zip.
33#
44# Requires (one-time, your Apple Developer account -- the external gate):
55# * A "Developer ID Application" certificate in your keychain.
@@ -20,32 +20,33 @@ ARCHIVE="$BUILD_DIR/Dory.xcarchive"
2020EXPORT_DIR=" $BUILD_DIR /export"
2121NOTARY_PROFILE=" ${DORY_NOTARY_PROFILE:- dory-notary} "
2222
23- echo " ==> Archiving Dory $VERSION ..."
23+ TEAM=" ${NOTARY_TEAM_ID:- 864H636QW4} "
24+ echo " ==> Archiving + signing Dory $VERSION (Developer ID, team $TEAM )..."
25+ # Manual Developer ID signing — automatic signing needs developer-portal access that CI lacks, and
26+ # there is no entitlements file requiring a provisioning profile.
2427xcodebuild -project Dory.xcodeproj -scheme Dory -configuration Release \
2528 -destination ' generic/platform=macOS' -archivePath " $ARCHIVE " \
26- MARKETING_VERSION=" $VERSION " archive
27-
28- cat > " $BUILD_DIR /ExportOptions.plist" << 'PLIST '
29- <?xml version="1.0" encoding="UTF-8"?>
30- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
31- <plist version="1.0"><dict>
32- <key>method</key><string>developer-id</string>
33- <key>signingStyle</key><string>automatic</string>
34- </dict></plist>
35- PLIST
36-
37- echo " ==> Exporting signed app..."
38- xcodebuild -exportArchive -archivePath " $ARCHIVE " \
39- -exportOptionsPlist " $BUILD_DIR /ExportOptions.plist" -exportPath " $EXPORT_DIR "
29+ MARKETING_VERSION=" $VERSION " \
30+ CODE_SIGN_STYLE=Manual \
31+ CODE_SIGN_IDENTITY=" Developer ID Application" \
32+ DEVELOPMENT_TEAM=" $TEAM " \
33+ archive
4034
35+ mkdir -p " $EXPORT_DIR "
36+ rm -rf " $EXPORT_DIR /Dory.app"
37+ cp -R " $ARCHIVE /Products/Applications/Dory.app" " $EXPORT_DIR /"
4138APP=" $EXPORT_DIR /Dory.app"
4239
43- if [ " ${DORY_BUNDLE_ENGINE:- 1} " = " 1" ]; then
44- echo " ==> Bundling the engine for a self-contained app (no extra downloads for users)..."
40+ # Engine bundling is off by default — the app pulls the engine on first run. Set DORY_BUNDLE_ENGINE=1
41+ # for a self-contained app (needs the engine assets present locally).
42+ if [ " ${DORY_BUNDLE_ENGINE:- 0} " = " 1" ]; then
43+ echo " ==> Bundling the engine for a self-contained app..."
4544 scripts/bundle-engine.sh " $APP "
46- codesign --force --deep --options runtime --sign " Developer ID Application" " $APP "
4745fi
4846
47+ echo " ==> Signing (Developer ID + hardened runtime)..."
48+ codesign --force --deep --options runtime --timestamp --sign " Developer ID Application" " $APP "
49+
4950ZIP=" $BUILD_DIR /Dory-$VERSION .zip"
5051ditto -c -k --keepParent " $APP " " $ZIP "
5152
0 commit comments