Hopefully fix Travis CI building once and for all.

CQTexperiment
Christopher Snowhill 2017-12-27 17:33:52 -08:00
parent 550d09b1cb
commit 2abba64b32
3 changed files with 19 additions and 3 deletions

View File

@ -2,4 +2,4 @@ os: osx
osx_image: xcode9.2
language: objective-c
script:
- Scripts/build.sh CODE_SIGNING_REQUIRED=NO
- Scripts/build.sh -n

View File

@ -2505,7 +2505,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "${PROJECT_DIR}/Scripts/genversion.sh\ncodesign -f -s \"${CODE_SIGN_IDENTITY}\" --deep \"${CONFIGURATION_BUILD_DIR}/${PRODUCT_NAME}.app\"";
shellScript = "${PROJECT_DIR}/Scripts/genversion.sh\nif [ "$CODE_SIGN_IDENTITY" -ne "" ]; then codesign -f -s \"${CODE_SIGN_IDENTITY}\" --deep \"${CONFIGURATION_BUILD_DIR}/${PRODUCT_NAME}.app\"; fi";
};
/* End PBXShellScriptBuildPhase section */

View File

@ -4,7 +4,23 @@ pushd $(dirname $0)
BASE=`pwd -P`
popd
sign=true
while getopts ":hn" option; do
case $option in
h) echo "usage: $0 [-h] [-n]"; exit ;;
n) sign=false ;;
?) echo "error: option -$OPTARG is not implemented"; exit ;;
esac
done
SIGNARGS=""
if [ "$sign" = true ] ; then
SIGNARGS=('CODE_SIGN_IDENTITY=""' 'CODE_SIGNING_REQUIRED=NO')
fi
BUILDPRODUCTS="$BASE"/build/Build/Products/Release
xcodebuild -quiet -workspace "$BASE"/../Cog.xcodeproj/project.xcworkspace -scheme Cog -configuration Release -derivedDataPath "$BASE"/build $1
xcodebuild -quiet -workspace "$BASE"/../Cog.xcodeproj/project.xcworkspace -scheme Cog -configuration Release -derivedDataPath "$BASE"/build ${SIGNARGS[*]}