Skip to content

Commit b6681b9

Browse files
committed
[macOS] Use notarytool instead of deprecated altool.
1 parent e3827e1 commit b6681b9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

build-release.sh

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

51-
_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")
52-
_request_uuid=$(echo ${_request_uuid} | sed -e 's/.*RequestUUID = //')
53-
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"
54-
if ! ssh "${OSX_HOST}" "xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\" | grep -q Status:\ success"; then
51+
_request_uuid=$(ssh "${OSX_HOST}" "xcrun notarytool submit ${_macos_tmpdir}/${_binname}_signed.zip --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" --no-progress")
52+
_request_uuid=$(echo ${_request_uuid} | grep 'id:' | sed -e 's/.*id: //')
53+
if ! ssh "${OSX_HOST}" "xcrun notarytool wait ${_request_uuid} --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" | grep -q status:\ Accepted"; then
5554
echo "Notarization failed."
56-
_notarization_log=$(ssh "${OSX_HOST}" "xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\"")
55+
_notarization_log=$(ssh "${OSX_HOST}" "xcrun notarytool log ${_request_uuid} --apple-id \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\"")
5756
echo "${_notarization_log}"
5857
ssh "${OSX_HOST}" "rm -rf ${_macos_tmpdir}"
5958
exit 1

0 commit comments

Comments
 (0)