1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-24 03:25:03 +03:00

Add notarize script

This commit is contained in:
Tae Won Ha 2020-11-15 17:50:14 +01:00
parent 3d42944741
commit a3afb249f5
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

29
bin/notarize_vimr.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
set -Eeuo pipefail
readonly vimr_app_path=${vimr_app_path:?"Path to VimR.app"}
main() {
pushd "${vimr_app_path}/.." >/dev/null
echo "### Notarizing"
ditto -c -k --keepParent VimR.app VimR.app.zip
echo "### Uploading"
declare -x request_uuid
request_uuid=$(xcrun \
altool --notarize-app --primary-bundle-id "com.qvacua.VimR" \
--username "hataewon@gmail.com" --password "@keychain:dev-notar" \
--file VimR.app.zip | grep RequestUUID | sed -E 's/.* = (.*)/\1/')
readonly request_uuid
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
echo "### Waiting for notarization ${request_uuid} to finish"
./bin/wait_for_notarization.py
echo "### Notarization finished"
popd >/dev/null
xcrun stapler staple VimR.app
popd >/dev/null
}
main