mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-06 15:21:21 +08:00
macos notarization: Wait for the notary to be ready
Pffff
This commit is contained in:
12
.github/workflows/macos.yml
vendored
12
.github/workflows/macos.yml
vendored
@ -36,15 +36,3 @@ jobs:
|
|||||||
name: Installer
|
name: Installer
|
||||||
path: build/macos/Build/Products/Release/GitJournal.dmg
|
path: build/macos/Build/Products/Release/GitJournal.dmg
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: "Upload Artifact"
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: App-Notarize-ID
|
|
||||||
path: /tmp/app_notarize
|
|
||||||
if-no-files-found: error
|
|
||||||
- name: "Upload Artifact"
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: DMG-Notarize-ID
|
|
||||||
path: /tmp/dmg_notarize
|
|
||||||
if-no-files-found: error
|
|
||||||
|
@ -1,6 +1,24 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
set -x
|
||||||
|
|
||||||
|
function notarize_check() {
|
||||||
|
$APP_NOTARIZER -c -u "ios.ci@gitjournal.io" -p "$FASTLANE_PASSWORD" -k "$1" |
|
||||||
|
grep -A 1 '<key>Status</key>' |
|
||||||
|
tail -n 1 >/tmp/foo
|
||||||
|
|
||||||
|
grep -m 1 success /tmp/foo
|
||||||
|
}
|
||||||
|
|
||||||
|
function wait_for_notary() {
|
||||||
|
xml sel -t -v "//plist" /tmp/app_notarizer | grep -A 1 RequestUUID | tail -n 1 | tr -d "[:blank:]" >/tmp/dmg_notarize
|
||||||
|
ID=$(cat /tmp/dmg_notarize)
|
||||||
|
until notarize_check "$ID"; do
|
||||||
|
echo "Waiting for Notary ..."
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
cd ../
|
cd ../
|
||||||
@ -32,9 +50,8 @@ $APP_NOTARIZER --notarize -a "$APP_NAME.app" -b "io.gitjournal.gitjournal" \
|
|||||||
-e "$ENTITLEMENTS" -v "4NYTN6RU3N" \
|
-e "$ENTITLEMENTS" -v "4NYTN6RU3N" \
|
||||||
-i "Developer ID Application: Vishesh Handa (4NYTN6RU3N)"
|
-i "Developer ID Application: Vishesh Handa (4NYTN6RU3N)"
|
||||||
|
|
||||||
xml sel -t -v "//plist" /tmp/app_notarizer | grep -A 1 RequestUUID | tail -n 1 | tr -d "[:blank:]" >/tmp/app_notarize
|
wait_for_notary
|
||||||
|
|
||||||
# FIXME: What till request is done?
|
|
||||||
$APP_NOTARIZER --staple --file "$APP_NAME.app"
|
$APP_NOTARIZER --staple --file "$APP_NAME.app"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
@ -59,7 +76,6 @@ $APP_NOTARIZER --notarize -a "$APP_NAME.dmg" -b "io.gitjournal.gitjournal" \
|
|||||||
-v "4NYTN6RU3N" \
|
-v "4NYTN6RU3N" \
|
||||||
-i "Developer ID Installer: Vishesh Handa (4NYTN6RU3N)"
|
-i "Developer ID Installer: Vishesh Handa (4NYTN6RU3N)"
|
||||||
|
|
||||||
xml sel -t -v "//plist" /tmp/app_notarizer | grep -A 1 RequestUUID | tail -n 1 | tr -d "[:blank:]" >/tmp/dmg_notarize
|
wait_for_notary
|
||||||
|
|
||||||
# FIXME: What till request is done?
|
|
||||||
$APP_NOTARIZER --staple --file "$APP_NAME.dmg"
|
$APP_NOTARIZER --staple --file "$APP_NAME.dmg"
|
||||||
|
Reference in New Issue
Block a user