Switch to notarytool for Mac build notarization
This commit is contained in:
parent
f1003a1d1e
commit
00651d670d
5 changed files with 6 additions and 48 deletions
30
app/build.sh
30
app/build.sh
|
@ -587,37 +587,11 @@ if [ $BUILD_MAC == 1 ]; then
|
|||
|
||||
if [ "$UPDATE_CHANNEL" != "test" ]; then
|
||||
# Upload disk image to Apple
|
||||
output=$("$CALLDIR/scripts/notarize_mac_app" "$dmg")
|
||||
"$CALLDIR/scripts/notarize_mac_app" "$dmg"
|
||||
echo
|
||||
echo "$output"
|
||||
echo
|
||||
id=$(echo "$output" | plutil -extract notarization-upload.RequestUUID xml1 -o - - | sed -n "s/.*<string>\(.*\)<\/string>.*/\1/p")
|
||||
echo "Notarization request identifier: $id"
|
||||
echo
|
||||
|
||||
sleep 60
|
||||
|
||||
# Check back every 30 seconds, for up to an hour
|
||||
i="0"
|
||||
while [ $i -lt 120 ]
|
||||
do
|
||||
status=$("$CALLDIR/scripts/notarization_status" $id)
|
||||
if [[ $status != "in progress" ]]; then
|
||||
break
|
||||
fi
|
||||
echo "Notarization in progress"
|
||||
sleep 30
|
||||
i=$[$i+1]
|
||||
done
|
||||
|
||||
# Staple notarization info to disk image
|
||||
if [ $status == "success" ]; then
|
||||
"$CALLDIR/scripts/notarization_stapler" "$dmg"
|
||||
else
|
||||
echo "Notarization failed!"
|
||||
"$CALLDIR/scripts/notarization_status" $id
|
||||
exit 1
|
||||
fi
|
||||
"$CALLDIR/scripts/notarization_stapler" "$dmg"
|
||||
|
||||
echo "Notarization complete"
|
||||
else
|
||||
|
|
|
@ -22,6 +22,7 @@ KEYCHAIN=""
|
|||
KEYCHAIN_PASSWORD=""
|
||||
NOTARIZATION_BUNDLE_ID=""
|
||||
NOTARIZATION_USER=""
|
||||
NOTARIZATION_TEAM_ID=""
|
||||
NOTARIZATION_PASSWORD=""
|
||||
|
||||
# Paths for Windows installer build
|
||||
|
|
|
@ -15,4 +15,5 @@ if [[ -z "$id" ]]; then
|
|||
usage
|
||||
fi
|
||||
|
||||
xcrun altool --notarization-info "$id" -u "$NOTARIZATION_USER" -p "$NOTARIZATION_PASSWORD" --output-format xml
|
||||
xcrun notarytool log "$id" --apple-id "$NOTARIZATION_USER" --team-id "$NOTARIZATION_TEAM_ID" --password "$NOTARIZATION_PASSWORD" notary_log.json
|
||||
cat notary_log.json
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
. "$ROOT_DIR/config.sh"
|
||||
|
||||
function usage {
|
||||
echo "Usage: $0 id"
|
||||
exit 1
|
||||
}
|
||||
|
||||
id=${1:-}
|
||||
if [[ -z "$id" ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
$SCRIPT_DIR/notarization_info "$id" | plutil -extract notarization-info.Status xml1 -o - - | sed -n "s/.*<string>\(.*\)<\/string>.*/\1/p"
|
|
@ -16,4 +16,4 @@ if [[ -z "$file" ]]; then
|
|||
fi
|
||||
|
||||
echo "Uploading ${file##*/} to Apple for notarization" >&2
|
||||
xcrun altool --notarize-app --primary-bundle-id "$NOTARIZATION_BUNDLE_ID" --username "$NOTARIZATION_USER" --password "$NOTARIZATION_PASSWORD" --file $file --output-format xml
|
||||
xcrun notarytool submit $file --apple-id "$NOTARIZATION_USER" --team-id "$NOTARIZATION_TEAM_ID" --password="$NOTARIZATION_PASSWORD" --wait
|
||||
|
|
Loading…
Add table
Reference in a new issue