Merge pull request #26013 from ksooo/estuary-recordings-info
[xbmc.git] / tools / darwin / packaging / osx / notarize.sh
blob8f6b089cf85d74f0e2014702067984d74826c646
1 #!/usr/bin/env bash
3 # credits:
4 # https://scriptingosx.com/2019/09/notarize-a-command-line-tool/
5 # https://developer.apple.com/documentation/technotes/tn3147-migrating-to-the-latest-notarization-tool
7 set -e
9 if [[ -z "$NOTARYTOOL_KEYCHAIN_PROFILE" ]]; then
10 echo "skipping notarization"
11 exit 0
14 dmg="$1"
15 xcrun notarytool submit \
16 --keychain-profile "$NOTARYTOOL_KEYCHAIN_PROFILE" \
17 ${NOTARYTOOL_KEYCHAIN_PATH:+--keychain "$NOTARYTOOL_KEYCHAIN_PATH"} \
18 --wait --timeout '1h' \
19 "$dmg" 2>&1
20 xcrun stapler staple "$dmg"