Skip to content

Commit 09b9dcf

Browse files
authoredOct 31, 2023
Merge pull request #76 from bruvzg/notarytool
[macOS] Use notarytool instead of deprecated altool.
2 parents 93d2533 + 7b9e427 commit 09b9dcf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
 

‎build-release.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ sign_macos() {
4949
-s ${OSX_KEY_ID} -v ${_appname} && \
5050
zip -r ${_binname}_signed.zip ${_appname}"
5151

52-
_request_uuid=$(ssh "${OSX_HOST}" "xcrun altool --notarize-app --primary-bundle-id \"${OSX_BUNDLE_ID}\" --username \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" --file ${_macos_tmpdir}/${_binname}_signed.zip")
53-
_request_uuid=$(echo ${_request_uuid} | sed -e 's/.*RequestUUID = //')
54-
ssh "${OSX_HOST}" "while xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\" | grep -q Status:\ in\ progress; do echo Waiting on Apple notarization...; sleep 30s; done"
55-
if ! ssh "${OSX_HOST}" "xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\" | grep -q Status:\ success"; then
52+
_request_uuid=$(ssh "${OSX_HOST}" "xcrun notarytool submit ${_macos_tmpdir}/${_binname}_signed.zip --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" --no-progress --output-format json")
53+
_request_uuid=$(echo ${_request_uuid} | sed -e 's/.*"id":"\([^"]*\)".*/\1/')
54+
if ! ssh "${OSX_HOST}" "xcrun notarytool wait ${_request_uuid} --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" | grep -q status:\ Accepted"; then
5655
echo "Notarization failed."
57-
_notarization_log=$(ssh "${OSX_HOST}" "xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\"")
56+
_notarization_log=$(ssh "${OSX_HOST}" "xcrun notarytool log ${_request_uuid} --team-id \"${APPLE_TEAM}\" --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\"")
5857
echo "${_notarization_log}"
5958
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}"
6059
exit 1

‎config.sh.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export OSX_HOST=''
5050
export OSX_KEY_ID=''
5151
# Bundle id for the signed app
5252
export OSX_BUNDLE_ID=''
53-
# Username/password for Apple's signing APIs (used for atltool)
53+
# Username/password for Apple's signing APIs (used for notarytool)
54+
export APPLE_TEAM=''
5455
export APPLE_ID=''
5556
export APPLE_ID_PASSWORD=''
5657

0 commit comments

Comments
 (0)
Please sign in to comment.