From b6348c932b343b9b0fbfdb074e9fdd308994e347 Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Sat, 2 Dec 2017 15:18:58 -0500 Subject: [PATCH] CI: Fix Mac builds on Travis CI's Xcode 8.3 image The Travis CI Xcode 8.3 image uses macOS 10.12, where some OS and Xcode components were changed. This commit finally fixes macOS deployments on Travis for Xcode 8.3. This commit also reverts a few changes that got into master while we were trying to fix this. --- CI/before-deploy-osx.sh | 4 ++-- CI/install/osx/build_app.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CI/before-deploy-osx.sh b/CI/before-deploy-osx.sh index 3906ccb97..4e698b82f 100755 --- a/CI/before-deploy-osx.sh +++ b/CI/before-deploy-osx.sh @@ -45,10 +45,10 @@ security create-keychain -p mysecretpassword build.keychain security default-keychain -s build.keychain security unlock-keychain -p mysecretpassword build.keychain security set-keychain-settings -t 3600 -u build.keychain -security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword build.keychain -security list-keychains -s build.keychain hr "Importing certs into keychain" security import ./Certificates.p12 -k build.keychain -T /usr/bin/productsign -P "" +# macOS 10.12+ +security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword build.keychain hr "Signing Package" productsign --sign 2MMRE5MTB8 ./OBS.pkg ./$FILENAME diff --git a/CI/install/osx/build_app.py b/CI/install/osx/build_app.py index edda89540..907e11300 100644 --- a/CI/install/osx/build_app.py +++ b/CI/install/osx/build_app.py @@ -84,10 +84,9 @@ for i in candidate_paths: for file_ in files: path = root + "/" + file_ try: - out = check_output("{0}otool -L '{1}'".format(args.prefix, path), - stderr=subprocess.STDOUT, shell=True, + out = check_output("{0}otool -L '{1}'".format(args.prefix, path), shell=True, universal_newlines=True) - if "The file was not recognized as a valid object file" in out: + if "is not an object file" in out: continue except: continue