-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,38 @@ | ||
#!/bin/sh | ||
|
||
# Submit the dmg and get REQUEST_UUID | ||
SUBMISSION_INFO=$(xcrun altool --notarize-app --primary-bundle-id=${PRIMARY_BUNDLE_ID} -u ${APPLE_ID} -p ${APP_SPECIFIC_PASSWORD} --file ${TARGET_BINARY} 2>&1) ; | ||
## Submit the dmg and get REQUEST_UUID | ||
#SUBMISSION_INFO=$(xcrun altool --notarize-app --primary-bundle-id=${PRIMARY_BUNDLE_ID} -u ${APPLE_ID} -p ${APP_SPECIFIC_PASSWORD} --file ${TARGET_BINARY} 2>&1) ; | ||
# | ||
#if [ $? != 0 ]; then | ||
# printf "Submission failed: $SUBMISSION_INFO \n" | ||
# exit 5 | ||
#fi | ||
# | ||
#REQUEST_UUID=$(echo ${SUBMISSION_INFO} | awk -F ' = ' '/RequestUUID/ {print $2}') | ||
#if [ -z "${REQUEST_UUID}" ]; then | ||
# echo "Errors trying to upload ${TARGET_BINARY}.zip: ${SUBMISSION_INFO}" | ||
# exit 6 | ||
#fi | ||
# | ||
## Wait for "Package Approved" | ||
#while ! xcrun altool --notarization-info ${REQUEST_UUID} --username ${APPLE_ID} --password ${APP_SPECIFIC_PASSWORD} --output-format xml | grep -q 'Package Approved' ; do | ||
# sleep 60; | ||
#done | ||
# | ||
#echo "Package Approved: REQUEST_UUID=$REQUEST_UUID can be accessed with this query: xcrun altool --notarization-info $REQUEST_UUID --username ${APPLE_ID} --output-format xml --password app_specific_password" | ||
#xcrun stapler staple ${TARGET_BINARY} | ||
|
||
if [ $? != 0 ]; then | ||
printf "Submission failed: $SUBMISSION_INFO \n" | ||
exit 5 | ||
fi | ||
xcrun notarytool submit \ | ||
--apple-id ${APPLE_ID} \ | ||
--password ${APP_SPECIFIC_PASSWORD} \ | ||
--wait \ | ||
${TARGET_BINARY} | ||
|
||
REQUEST_UUID=$(echo ${SUBMISSION_INFO} | awk -F ' = ' '/RequestUUID/ {print $2}') | ||
if [ -z "${REQUEST_UUID}" ]; then | ||
echo "Errors trying to upload ${TARGET_BINARY}.zip: ${SUBMISSION_INFO}" | ||
exit 6 | ||
if [ $? -eq 0 ]; then | ||
echo "Notarization submitted successfully." | ||
else | ||
echo "Notarization failed." | ||
exit 1 | ||
fi | ||
|
||
# Wait for "Package Approved" | ||
while ! xcrun altool --notarization-info ${REQUEST_UUID} --username ${APPLE_ID} --password ${APP_SPECIFIC_PASSWORD} --output-format xml | grep -q 'Package Approved' ; do | ||
sleep 60; | ||
done | ||
|
||
echo "Package Approved: REQUEST_UUID=$REQUEST_UUID can be accessed with this query: xcrun altool --notarization-info $REQUEST_UUID --username ${APPLE_ID} --output-format xml --password app_specific_password" | ||
|
||
xcrun stapler staple ${TARGET_BINARY} |