Skip to content

Commit 8ec0fb7

Browse files
committed
Updated macOS arm64 nightly build pieces, to notarize the binaries
1 parent 23dc6cd commit 8ec0fb7

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

installer/macos/.db4s_secure

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# This file stores the secure values called by our macOS nightly build scripts
2+
APPLE_ID="Your email address"
13
DEV_ID="Developer ID Application: Your name (AABBCCDDEE)"
24
KEYCHAIN_PASSWORD="yourpassword"
5+
# Info about the "profile name": https://github.com/sqlitebrowser/sqlitebrowser/wiki/Notarizing-our-macOS-releases
6+
PROFILE_NAME="used-to-locate-your-app-specific-password"
7+
TEAM_ID="1122334455"
38
UPLOAD_SERVER="[email protected]"

installer/macos/build_sqlitebrowser_nightly-arm64.sh

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,24 @@ done
131131
cp installer/macos/macapp.icns build/DB\ Browser\ for\ SQLite.app/Contents/Resources/ >>$LOG 2>&1
132132
/usr/libexec/PlistBuddy -c "Set :CFBundleIconFile macapp.icns" build/DB\ Browser\ for\ SQLite.app/Contents/Info.plist >>$LOG 2>&1
133133

134-
# Sign the added libraries
134+
# Sign the manually added extensions. Needs to be done prior to the ".app signing" bit below, as that doesn't seem to sign these... which results in notarisation failure later on
135+
codesign --sign "${DEV_ID}" --verbose --deep --force --keychain "/Library/Keychains/System.keychain" --options runtime --timestamp build/DB\ Browser\ for\ SQLite.app/Contents/Extensions/fileio.dylib >>$LOG 2>&1
136+
codesign --sign "${DEV_ID}" --verbose --deep --force --keychain "/Library/Keychains/System.keychain" --options runtime --timestamp build/DB\ Browser\ for\ SQLite.app/Contents/Extensions/formats.dylib >>$LOG 2>&1
137+
codesign --sign "${DEV_ID}" --verbose --deep --force --keychain "/Library/Keychains/System.keychain" --options runtime --timestamp build/DB\ Browser\ for\ SQLite.app/Contents/Extensions/math.dylib >>$LOG 2>&1
138+
139+
# Sign the app (again). Needs to be done after the extensions are manually signed (above), else notarisation fails
135140
codesign --sign "${DEV_ID}" --verbose --deep --force --keychain "/Library/Keychains/System.keychain" --options runtime --timestamp build/DB\ Browser\ for\ SQLite.app >>$LOG 2>&1
136141

137142
# Make a .dmg file from the .app
138143
mv build/DB\ Browser\ for\ SQLite.app $HOME/appdmg/ >>$LOG 2>&1
139144
cd $HOME/appdmg >>$LOG 2>&1
140145
appdmg --quiet nightly.json DB\ Browser\ for\ SQLite-arm64_${DATE}.dmg >>$LOG 2>&1
141-
codesign --sign "${DEV_ID}" --verbose --deep --keychain "/Library/Keychains/System.keychain" --options runtime --timestamp DB\ Browser\ for\ SQLite-arm64_${DATE}.dmg >>$LOG 2>&1
146+
codesign --sign "${DEV_ID}" --verbose --keychain "/Library/Keychains/System.keychain" --options runtime --timestamp DB\ Browser\ for\ SQLite-arm64_${DATE}.dmg >>$LOG 2>&1
147+
148+
# Notarise the .app
149+
security unlock-keychain -p "${KEYCHAIN_PASSWORD}" db4s.keychain
150+
xcrun notarytool submit --apple-id "${APPLE_ID}" --team-id "${TEAM_ID}" --wait --keychain-profile "${PROFILE_NAME}" --keychain /Users/jc/Library/Keychains/db4s.keychain-db DB\ Browser\ for\ SQLite-arm64_${DATE}.dmg >>$LOG 2>&1
151+
xcrun stapler staple DB\ Browser\ for\ SQLite-arm64_${DATE}.dmg >>$LOG 2>&1
142152
mv DB\ Browser\ for\ SQLite-arm64_${DATE}.dmg $HOME/db4s_nightlies/ >>$LOG 2>&1
143153
rm -rf $HOME/appdmg/DB\ Browser\ for\ SQLite.app >>$LOG 2>&1
144154

@@ -211,14 +221,24 @@ done
211221
cp installer/macos/macapp.icns build/DB\ Browser\ for\ SQLite.app/Contents/Resources/ >>$LOG 2>&1
212222
/usr/libexec/PlistBuddy -c "Set :CFBundleIconFile macapp.icns" build/DB\ Browser\ for\ SQLite.app/Contents/Info.plist >>$LOG 2>&1
213223

214-
# Sign the .app
224+
# Sign the manually added extensions. Needs to be done prior to the ".app signing" bit below, as that doesn't seem to sign these... which results in notarisation failure later on
225+
codesign --sign "${DEV_ID}" --verbose --deep --force --keychain "/Library/Keychains/System.keychain" --options runtime --timestamp build/DB\ Browser\ for\ SQLite.app/Contents/Extensions/fileio.dylib >>$LOG 2>&1
226+
codesign --sign "${DEV_ID}" --verbose --deep --force --keychain "/Library/Keychains/System.keychain" --options runtime --timestamp build/DB\ Browser\ for\ SQLite.app/Contents/Extensions/formats.dylib >>$LOG 2>&1
227+
codesign --sign "${DEV_ID}" --verbose --deep --force --keychain "/Library/Keychains/System.keychain" --options runtime --timestamp build/DB\ Browser\ for\ SQLite.app/Contents/Extensions/math.dylib >>$LOG 2>&1
228+
229+
# Sign the app (again). Needs to be done after the extensions are manually signed (above), else notarisation fails
215230
codesign --sign "${DEV_ID}" --verbose --deep --force --keychain "/Library/Keychains/System.keychain" --options runtime --timestamp build/DB\ Browser\ for\ SQLite.app >>$LOG 2>&1
216231

217232
# Make a .dmg file from the .app
218233
mv build/DB\ Browser\ for\ SQLite.app $HOME/appdmg/ >>$LOG 2>&1
219234
cd $HOME/appdmg >>$LOG 2>&1
220235
appdmg --quiet nightly.json DB\ Browser\ for\ SQLite-sqlcipher-arm64_${DATE}.dmg >>$LOG 2>&1
221-
codesign --sign "${DEV_ID}" --verbose --deep --keychain "/Library/Keychains/System.keychain" --options runtime --timestamp DB\ Browser\ for\ SQLite-sqlcipher-arm64_${DATE}.dmg >>$LOG 2>&1
236+
codesign --sign "${DEV_ID}" --verbose --keychain "/Library/Keychains/System.keychain" --options runtime --timestamp DB\ Browser\ for\ SQLite-sqlcipher-arm64_${DATE}.dmg >>$LOG 2>&1
237+
238+
# Notarise the .app
239+
security unlock-keychain -p "${KEYCHAIN_PASSWORD}" db4s.keychain
240+
xcrun notarytool submit --apple-id "${APPLE_ID}" --team-id "${TEAM_ID}" --wait --keychain-profile "${PROFILE_NAME}" --keychain /Users/jc/Library/Keychains/db4s.keychain-db DB\ Browser\ for\ SQLite-sqlcipher-arm64_${DATE}.dmg >>$LOG 2>&1
241+
xcrun stapler staple DB\ Browser\ for\ SQLite-sqlcipher-arm64_${DATE}.dmg >>$LOG 2>&1
222242
mv DB\ Browser\ for\ SQLite-sqlcipher-arm64_${DATE}.dmg $HOME/db4s_nightlies/ >>$LOG 2>&1
223243
rm -rf $HOME/appdmg/DB\ Browser\ for\ SQLite.app >>$LOG 2>&1
224244

0 commit comments

Comments
 (0)