Skip to content

Commit

Permalink
Notarize alternative
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel committed Apr 6, 2020
1 parent b6bf073 commit 069d57b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 deletions.
42 changes: 25 additions & 17 deletions scripts/notarize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,28 @@ fi
# xcrun altool --store-password-in-keychain-item "AC_PASSWORD" -u "[email protected]" -p "<password>"

# Try different transport in flakey environments e.g., --transport Aspera

xcrun altool --notarize-app \
--verbose \
--primary-bundle-id "pub.Keys" \
--username "[email protected]" \
--password "@keychain:AC_PASSWORD" \
--file Keys-$ver.dmg

# xcrun altool --notarization-history 0 -u "[email protected]" -p "@keychain:AC_PASSWORD"

xcrun stapler staple "Keys-0.0.23.dmg"

# ditto -x -k Keys-$ver-mac.zip .
# xcrun stapler staple "Keys.app"
# rm Keys-$ver-mac.zip
# ditto -ck --sequesterRsrc --keepParent Keys.app Keys-$ver-mac.zip
# rm -rf Keys.app
# --verbose \

file=release/Keys-$ver.dmg

uuid=`xcrun altool --notarize-app --primary-bundle-id "pub.Keys" --username "[email protected]" --password "@keychain:AC_PASSWORD" --file $file 2>&1 | grep 'RequestUUID' | awk '{ print $3 }'`

echo "Successfully uploaded to notarization service, polling for result: $uuid"
sleep 15
while :
do
fullstatus=`xcrun altool --notarization-info "$uuid" --username "[email protected]" --password "@keychain:AC_PASSWORD" 2>&1`
status=`echo "$fullstatus" | grep 'Status\:' | awk '{ print $2 }'`
if [ "$status" = "success" ]; then
echo "Notarization success"
xcrun stapler staple "$file"
return
elif [ "$status" = "in" ]; then
echo "Notarization still in progress, sleeping for 15 seconds and trying again"
sleep 15
else
echo "Notarization failed fullstatus below"
echo "$fullstatus"
exit 1
fi
done
4 changes: 4 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ yarn dist

ver=`yarn run -s version`

# Notarize (using afterSign notarize.js)
# sh scripts/notarize.sh $ver

# Install release tool
sh scripts/release-tool.sh

release fix-build -version $ver -in release -out release
Expand Down

0 comments on commit 069d57b

Please sign in to comment.