summaryrefslogtreecommitdiff
path: root/indra/newview/installers/darwin/apple-notarize.sh
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2022-03-02 00:46:10 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2022-03-02 00:46:10 +0200
commit0aaf5284dced4ec41924c771a382d12ddc5f3d1b (patch)
tree448ad9399feee611f992ceeb667cd4e47e9ab594 /indra/newview/installers/darwin/apple-notarize.sh
parent882600de2afa366729be870355767282247be0ef (diff)
parent6ca09a94554ec01f5c94ec60fffd01d7e33f3546 (diff)
Merge branch 'master' into DRTVWR-539
# Conflicts: # autobuild.xml # doc/contributions.txt # indra/cmake/GLOD.cmake # indra/llcommon/tests/llprocess_test.cpp # indra/newview/VIEWER_VERSION.txt # indra/newview/lldrawpoolavatar.cpp # indra/newview/llfloatermodelpreview.cpp # indra/newview/llmodelpreview.cpp # indra/newview/llviewertexturelist.cpp # indra/newview/llvovolume.cpp # indra/newview/viewer_manifest.py
Diffstat (limited to 'indra/newview/installers/darwin/apple-notarize.sh')
-rwxr-xr-xindra/newview/installers/darwin/apple-notarize.sh38
1 files changed, 20 insertions, 18 deletions
diff --git a/indra/newview/installers/darwin/apple-notarize.sh b/indra/newview/installers/darwin/apple-notarize.sh
index e019437924..d90772ec0e 100755
--- a/indra/newview/installers/darwin/apple-notarize.sh
+++ b/indra/newview/installers/darwin/apple-notarize.sh
@@ -5,12 +5,12 @@ if [[ $SKIP_NOTARIZATION == "true" ]]; then
fi
CONFIG_FILE="$build_secrets_checkout/code-signing-osx/notarize_creds.sh"
-if [ -f "$CONFIG_FILE" ]; then
- source $CONFIG_FILE
+if [[ -f "$CONFIG_FILE" ]]; then
+ source "$CONFIG_FILE"
app_file="$1"
zip_file=${app_file/app/zip}
ditto -c -k --keepParent "$app_file" "$zip_file"
- if [ -f "$zip_file" ]; then
+ if [[ -f "$zip_file" ]]; then
res=$(xcrun altool --notarize-app --primary-bundle-id "com.secondlife.viewer" \
--username $USERNAME \
--password $PASSWORD \
@@ -19,37 +19,39 @@ if [ -f "$CONFIG_FILE" ]; then
echo $res
requestUUID=$(echo $res | awk '/RequestUUID/ { print $NF; }')
- echo "Apple Notarization RequestUUID: $requestUUID"
-
if [[ -n $requestUUID ]]; then
- status="in progress"
- while [[ "$status" == "in progress" ]]; do
+ in_progress=1
+ while [[ $in_progress -eq 1 ]]; do
sleep 30
- status=$(xcrun altool --notarization-info "$requestUUID" \
+ res=$(xcrun altool --notarization-info "$requestUUID" \
--username $USERNAME \
- --password $PASSWORD 2>&1 \
- | awk -F ': ' '/Status:/ { print $2; }' )
- echo "$status"
+ --password $PASSWORD 2>&1)
+ if [[ $res != *"in progress"* ]]; then
+ in_progress=0
+ fi
+ echo "."
done
# log results
- xcrun altool --notarization-info "$requestUUID" \
- --username $USERNAME \
- --password $PASSWORD
+ echo $res
#remove temporary file
rm "$zip_file"
- if [["$status" == "success"]]; then
+ if [[ $res == *"success"* ]]; then
xcrun stapler staple "$app_file"
- elif [["$status" == "invalid"]]; then
+ exit 0
+ elif [[ $res == *"invalid"* ]]; then
echo "Notarization error: failed to process the app file"
exit 1
+ else
+ echo "Notarization error: unknown response status"
fi
else
echo "Notarization error: couldn't get request UUID"
- echo $res
exit 1
fi
+ else
+ echo "Notarization error: ditto failed"
+ exit 1
fi
fi
-