aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/build.sh
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-12-10 23:44:49 +0000
committerstuconnolly <stuart02@gmail.com>2009-12-10 23:44:49 +0000
commit8ef59b0e71cb0e9587d30d4e8902dc97d23b5be2 (patch)
tree6eee904661de00996dc54eaae691a3a0de9f44e0 /Scripts/build.sh
parentd3a2a30cc490ceabb68f8bf679d8d328eb97a2a9 (diff)
downloadsequelpro-8ef59b0e71cb0e9587d30d4e8902dc97d23b5be2.tar.gz
sequelpro-8ef59b0e71cb0e9587d30d4e8902dc97d23b5be2.tar.bz2
sequelpro-8ef59b0e71cb0e9587d30d4e8902dc97d23b5be2.zip
Simplify the build script.
Diffstat (limited to 'Scripts/build.sh')
-rwxr-xr-xScripts/build.sh21
1 files changed, 12 insertions, 9 deletions
diff --git a/Scripts/build.sh b/Scripts/build.sh
index 8b0e27d1..aae730a6 100755
--- a/Scripts/build.sh
+++ b/Scripts/build.sh
@@ -11,24 +11,27 @@
## into Xcode's 'Run Scripts' build phase to make it easier to work with. As such this script
## can only be run by Xcode.
+BUILD_PRODUCT="${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}"
+
# 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
+ "${SRCROOT}/Scripts/trim-application.sh" -p "$BUILD_PRODUCT" -a
fi
# Perform distribution specific tasks if this is a 'Distribution' build
if [ "$CONFIGURATION" == 'Distribution' ]
then
- codesign -s 'Sequel Pro Distribution' "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}/Contents/Resources/SequelProTunnelAssistant" 2> /dev/null
- codesign -s 'Sequel Pro Distribution' "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}" 2> /dev/null
+ codesign -s 'Sequel Pro Distribution' "${BUILD_PRODUCT}/Contents/Resources/SequelProTunnelAssistant" 2> /dev/null
+ codesign -s 'Sequel Pro Distribution' "${BUILD_PRODUCT}" 2> /dev/null
# Verify that code signing has worked - all distribution builds must be signed with the same key.
- VERIFYERRORS=`codesign --verify "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}" 2>&1`
- VERIFYERRORS+=`codesign --verify "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}/Contents/Resources/SequelProTunnelAssistant" 2>&1`
+ VERIFYERRORS=`codesign --verify "$BUILD_PRODUCT" 2>&1`
+ VERIFYERRORS+=`codesign --verify "${BUILD_PRODUCT}/Contents/Resources/SequelProTunnelAssistant" 2>&1`
+
if [ "$VERIFYERRORS" != '' ]
then
echo "error: Signing verification threw an error: $VERIFYERRORS"
@@ -36,17 +39,17 @@ then
exit 1
fi
- "${SRCROOT}/Scripts/package-application.sh" -p "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}"
+ "${SRCROOT}/Scripts/package-application.sh" -p "$BUILD_PRODUCT"
fi
# Development build code signing
if [ "$CONFIGURATION" == 'Debug' ]
then
- codesign -s 'Sequel Pro Development' "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}/Contents/Resources/SequelProTunnelAssistant" 2> /dev/null
- codesign -s 'Sequel Pro Development' "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}" 2> /dev/null
+ codesign -s 'Sequel Pro Development' "${BUILD_PRODUCT}/Contents/Resources/SequelProTunnelAssistant" 2> /dev/null
+ codesign -s 'Sequel Pro Development' "$BUILD_PRODUCT" 2> /dev/null
# Run a fake command to silence errors
- touch "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}"
+ touch "$BUILD_PRODUCT"
fi
exit 0