forked from mac-cain13/R.swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create swift.yml * automatically bump homebrew version * remove unused file * add notarize step * import siging * use more secrets * use only one certificate for now. also mark pkg as artifact * fix p12 file name * also notarize zip. fix pkg root. import multiple p12’s. * use same passwords for keychain * remove stapler from notarize shell script * attach pkg and zip to artifacts * Delete swift.yml * Enable hardened runtime * make steps simpler * remove homebrew update step * Cleanup release workflow Co-authored-by: Mathijs Kadijk <[email protected]>
- Loading branch information
1 parent
dcab112
commit 7fbf193
Showing
3 changed files
with
114 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
|
||
requeststatus() { # $1: requestUUID | ||
requestUUID=${1?:"need a request UUID"} | ||
req_status=$(xcrun altool --notarization-info "$requestUUID" \ | ||
--username "$DEV_ACCOUNT" \ | ||
--password "$PASSWORD" 2>&1 \ | ||
| awk -F ': ' '/Status:/ { print $2; }' ) | ||
echo "$req_status" | ||
} | ||
|
||
|
||
notarizefile() { # $1: path to file to notarize, $2: identifier | ||
filepath=${1:?"need a filepath"} | ||
identifier=${2:?"need an identifier"} | ||
|
||
# upload file | ||
echo "## uploading $filepath for notarization" | ||
requestUUID=$(xcrun altool --notarize-app \ | ||
--primary-bundle-id "$BUNDLE_ID" \ | ||
--username "$DEV_ACCOUNT" \ | ||
--password "$PASSWORD" \ | ||
--asc-provider "$DEV_TEAM" \ | ||
--file "$FILENAME" 2>&1 \ | ||
| awk '/RequestUUID/ { print $NF; }') | ||
|
||
echo "Notarization RequestUUID: $requestUUID" | ||
|
||
if [[ $requestUUID == "" ]]; then | ||
echo "could not upload for notarization" | ||
exit 1 | ||
fi | ||
|
||
# wait for status to be not "in progress" any more | ||
request_status="in progress" | ||
while [[ "$request_status" == "in progress" ]]; do | ||
echo -n "waiting... " | ||
sleep 10 | ||
request_status=$(requeststatus "$requestUUID") | ||
echo "$request_status" | ||
done | ||
|
||
# print status information | ||
xcrun altool --notarization-info "$requestUUID" \ | ||
--username "$DEV_ACCOUNT" \ | ||
--password "$PASSWORD" | ||
echo | ||
|
||
if [[ $request_status != "success" ]]; then | ||
echo "## could not notarize $filepath" | ||
exit 1 | ||
fi | ||
} | ||
|
||
notarizefile "$FILENAME" "$BUNDLE_ID" |