Merge pull request #9570 from id/chore-fail-build-if-apple-notarization-failed

chore: fail build if apple notarization failed
This commit is contained in:
Ivan Dyachkov 2022-12-17 13:47:25 +01:00 committed by GitHub
commit d245a9909d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 4 deletions

16
build
View File

@ -285,10 +285,18 @@ make_tgz() {
# --apple-id <apple id> \ # --apple-id <apple id> \
# --password <apple id password> # --password <apple id password>
# --team-id <apple team id> <submission-id> # --team-id <apple team id> <submission-id>
xcrun notarytool submit \ echo 'Submitting the package for notarization to Apple (normally takes about a minute)'
--apple-id "${APPLE_ID}" \ notarytool_output="$(xcrun notarytool submit \
--password "${APPLE_ID_PASSWORD}" \ --apple-id "${APPLE_ID}" \
--team-id "${APPLE_TEAM_ID}" "${target}" --wait --password "${APPLE_ID_PASSWORD}" \
--team-id "${APPLE_TEAM_ID}" "${target}" \
--no-progress \
--wait)"
echo "$notarytool_output"
echo "$notarytool_output" | grep -q 'status: Accepted' || {
echo 'Notarization failed';
exit 1;
}
fi fi
# sha256sum may not be available on macos # sha256sum may not be available on macos
openssl dgst -sha256 "${target}" | cut -d ' ' -f 2 > "${target}.sha256" openssl dgst -sha256 "${target}" | cut -d ' ' -f 2 > "${target}.sha256"