diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-10-14 00:52:00 +0300 | 
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-10-14 00:52:00 +0300 | 
| commit | f9e7e59405a161828ec5dde624299b8aa67dc5b7 (patch) | |
| tree | 227aae383792ddcae99e70aad41c7f97edcd8e59 /indra/newview/installers | |
| parent | 9d6f7363cb26f4d77210109fe2b0cd90a2f4ab71 (diff) | |
| parent | cbaba2df56c66926e051d50b6cb02955c81c2a6c (diff) | |
Merge branch 'master' into DRTVWR-483
# Conflicts:
#	indra/newview/VIEWER_VERSION.txt
Diffstat (limited to 'indra/newview/installers')
| -rwxr-xr-x | indra/newview/installers/darwin/apple-notarize.sh | 54 | 
1 files changed, 54 insertions, 0 deletions
diff --git a/indra/newview/installers/darwin/apple-notarize.sh b/indra/newview/installers/darwin/apple-notarize.sh new file mode 100755 index 0000000000..466898ecda --- /dev/null +++ b/indra/newview/installers/darwin/apple-notarize.sh @@ -0,0 +1,54 @@ +#!/bin/sh +if [[ $SKIP_NOTARIZATION == "true" ]]; then +    echo "Skipping notarization" +    exit 0 +fi + +CONFIG_FILE="$build_secrets_checkout/code-signing-osx/notarize_creds.sh" +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 +        res=$(xcrun altool --notarize-app --primary-bundle-id "com.secondlife.viewer" \ +                                   --username $USERNAME \ +                                   --password $PASSWORD \ +                                   --asc-provider $ASC_PROVIDER \ +                                   --file "$zip_file" 2>&1) +        requestUUID=$(echo $res | awk '/RequestUUID/ { print $NF; }') + +        echo "Apple Notarization RequestUUID: $requestUUID" + +        if [[ -n $requestUUID ]]; then +            status="in progress" +            while [[ "$status" == "in progress" ]]; do +                sleep 30 +                status=$(xcrun altool --notarization-info "$requestUUID" \ +                                            --username $USERNAME \ +                                            --password $PASSWORD 2>&1 \ +                                | awk -F ': ' '/Status:/ { print $2; }' ) +                echo "$status" +            done +            # log results +            xcrun altool --notarization-info "$requestUUID" \ +                        --username $USERNAME \ +                        --password $PASSWORD + +            #remove temporary file +            rm "$zip_file" + +            if [["$status" == "success"]]; then +                xcrun stapler staple "$app_file" +            elif [["$status" == "invalid"]]; then +                echo "Notarization error: failed to process the app file" +                exit 1 +            fi +        else +            echo "Notarization error: couldn't get request UUID" +            echo $res +            exit 1 +        fi +    fi +fi +  | 
