blob: 0fa3fb661fdaa2dfc5f4ffec77a1d7cd3925afe1 [file] [log] [blame]
Kateryna Kostiuk03ce9b22019-07-15 08:58:09 -04001#!/bin/bash
2
3echo ""
4cd build-local
Kateryna Kostiuk5e7c7442020-04-30 09:01:42 -04005/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 Kostiuk03ce9b22019-07-15 08:58:09 -04006REQUESTID=$(xmllint --xpath "/plist/dict[key='notarization-upload']/dict/key[.='RequestUUID']/following-sibling::string[1]/node()" UploadInfo.plist)
7echo "file uploaded for notarization"
8echo ${REQUESTID}
Kateryna Kostiuke1962022019-08-13 16:18:48 -04009sleep 60
Kateryna Kostiuk03ce9b22019-07-15 08:58:09 -040010x=1
11while [ $x -le 15 ];
12do
Kateryna Kostiuk5e7c7442020-04-30 09:01:42 -040013/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 Kostiuk03ce9b22019-07-15 08:58:09 -040014ANSWER=$(xmllint --xpath "/plist/dict[key='notarization-info']/dict/key[.='Status']/following-sibling::string[1]/node()" RequestedInfo.plist)
15if [ "$ANSWER" == "in progress" ];
16then
17echo "notarization in progress"
18sleep 60
19x=$(( $x + 1 ))
20elif [ "$ANSWER" == "success" ]
21then
22echo "notarization success"
23break
24else
25echo "notarization failed"
26break
27exit 1
28fi
29done
30ANSWER=$(xmllint --xpath "/plist/dict[key='notarization-info']/dict/key[.='Status']/following-sibling::string[1]/node()" RequestedInfo.plist)
31if [ "$ANSWER" != "success" ];
32then
33echo "notarization failed"
34exit 1
35fi