Kateryna Kostiuk | 03ce9b2 | 2019-07-15 08:58:09 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | echo "" |
| 4 | cd build-local |
Kateryna Kostiuk | 5e7c744 | 2020-04-30 09:01:42 -0400 | [diff] [blame] | 5 | /Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework/Versions/A/Support/altool --notarize-app -t osx -f Jami.app.zip --primary-bundle-id ${BUNDLE_ID} -u ${APPLE_ACCOUNT} -p ${APPLE_PASSWORD} --output-format xml -itc_provider ${TEAM_ID} > UploadInfo.plist |
Kateryna Kostiuk | 03ce9b2 | 2019-07-15 08:58:09 -0400 | [diff] [blame] | 6 | REQUESTID=$(xmllint --xpath "/plist/dict[key='notarization-upload']/dict/key[.='RequestUUID']/following-sibling::string[1]/node()" UploadInfo.plist) |
| 7 | echo "file uploaded for notarization" |
| 8 | echo ${REQUESTID} |
Kateryna Kostiuk | e196202 | 2019-08-13 16:18:48 -0400 | [diff] [blame] | 9 | sleep 60 |
Kateryna Kostiuk | 03ce9b2 | 2019-07-15 08:58:09 -0400 | [diff] [blame] | 10 | x=1 |
| 11 | while [ $x -le 15 ]; |
| 12 | do |
Kateryna Kostiuk | 5e7c744 | 2020-04-30 09:01:42 -0400 | [diff] [blame] | 13 | /Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework/Versions/A/Support/altool --notarization-info ${REQUESTID} -u ${APPLE_ACCOUNT} -p ${APPLE_PASSWORD} --output-format xml > RequestedInfo.plist |
Kateryna Kostiuk | 03ce9b2 | 2019-07-15 08:58:09 -0400 | [diff] [blame] | 14 | ANSWER=$(xmllint --xpath "/plist/dict[key='notarization-info']/dict/key[.='Status']/following-sibling::string[1]/node()" RequestedInfo.plist) |
| 15 | if [ "$ANSWER" == "in progress" ]; |
| 16 | then |
| 17 | echo "notarization in progress" |
| 18 | sleep 60 |
| 19 | x=$(( $x + 1 )) |
| 20 | elif [ "$ANSWER" == "success" ] |
| 21 | then |
| 22 | echo "notarization success" |
| 23 | break |
| 24 | else |
| 25 | echo "notarization failed" |
| 26 | break |
| 27 | exit 1 |
| 28 | fi |
| 29 | done |
| 30 | ANSWER=$(xmllint --xpath "/plist/dict[key='notarization-info']/dict/key[.='Status']/following-sibling::string[1]/node()" RequestedInfo.plist) |
| 31 | if [ "$ANSWER" != "success" ]; |
| 32 | then |
| 33 | echo "notarization failed" |
| 34 | exit 1 |
| 35 | fi |