diff options
author | stuconnolly <stuart02@gmail.com> | 2009-10-31 14:31:59 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-10-31 14:31:59 +0000 |
commit | 802000b6dd29fd0ca6f60a2f51e7ab1eb49a2aef (patch) | |
tree | 0010d580fb1bb7feaceba3457d11c6cc8447b127 /Scripts/build.sh | |
parent | 21ef26e99439680e5bb9bb29bf6850bdd33e973c (diff) | |
download | sequelpro-802000b6dd29fd0ca6f60a2f51e7ab1eb49a2aef.tar.gz sequelpro-802000b6dd29fd0ca6f60a2f51e7ab1eb49a2aef.tar.bz2 sequelpro-802000b6dd29fd0ca6f60a2f51e7ab1eb49a2aef.zip |
Put all 'Run Scripts' build phase code into a single script 'build.sh' to make it easier to work with.
Diffstat (limited to 'Scripts/build.sh')
-rwxr-xr-x | Scripts/build.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Scripts/build.sh b/Scripts/build.sh new file mode 100755 index 00000000..80fef06f --- /dev/null +++ b/Scripts/build.sh @@ -0,0 +1,38 @@ +#! /bin/ksh + +## $Id$ +## +## Author: Stuart Connolly (stuconnolly.com) +## Copyright (c) 2009 Stuart Connolly. All rights reserved. +## +## Paramters: <none> +## +## Description: Generic Sequel Pro build script. This script is intended to replace entering lots of code +## into Xcode's 'Run Scripts' build phase to make it easier to work with. As such this script +## can only be run by Xcode. + +# Add the build/bundle version +"${SRCROOT}/Scripts/build-version.pl" + +# Trim the application if this is a 'Release' or 'Distribution' build +if [[ "$CONFIGURATION" == 'Release' || "$CONFIGURATION" == 'Distribution' ]] +then + "${SRCROOT}/Scripts/trim-application.sh" -p "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}" -a +fi + +# Perform distribution specific tasks if this is a 'Distribution' build +if [ "$CONFIGURATION" == 'Distribution' ] +then + "${SRCROOT}/Scripts/package-application.sh" -p "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}" +fi + +# Development build code signing +if [ "$CONFIGURATION" == 'Debug' ] +then + codesign -s 'Sequel Pro Development' "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}" 2> /dev/null + + # Run a fake command to silence errors + touch "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}" +fi + +exit 0 |