diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-04-29 04:57:05 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2021-04-29 04:57:05 +0300 |
commit | bd4ad276c0aec58a8852b848c190bd4b67e238f3 (patch) | |
tree | c3e5c76fac600752a5d7e7a5ade4f7f954750aef /indra/newview | |
parent | 0c13a8d08f505a1e8a8f48b7436f78b91d16a2fc (diff) |
DRTVWR-520 Notarize the viewer on TeamCity
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/installers/darwin/apple-notarize.sh | 42 | ||||
-rwxr-xr-x | indra/newview/viewer_manifest.py | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/indra/newview/installers/darwin/apple-notarize.sh b/indra/newview/installers/darwin/apple-notarize.sh new file mode 100644 index 0000000000..a590f52e38 --- /dev/null +++ b/indra/newview/installers/darwin/apple-notarize.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +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" + + + requestUUID=$(xcrun altool --notarize-app --primary-bundle-id "com.secondlife.viewer" \ + --username $USERNAME \ + --password $PASSWORD \ + --asc-provider $ASC_PROVIDER \ + --file "$zip_file" 2>&1 \ + | 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 + + if [["$status" == "success"]]; then + xcrun stapler staple "$app_file" + fi + fi +fi + diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 3c5240066f..fd8244b894 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1310,6 +1310,7 @@ class DarwinManifest(ViewerManifest): print >> sys.stderr, "Maximum codesign attempts exceeded; giving up" raise self.run_command(['spctl', '-a', '-texec', '-vvvv', app_in_dmg]) + self.run_command([self.src_path_of("installers/darwin/apple-notarize.sh"), app_in_dmg]) finally: # Unmount the image even if exceptions from any of the above |