aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts')
-rwxr-xr-xScripts/build.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/Scripts/build.sh b/Scripts/build.sh
index 80fef06f..8b0e27d1 100755
--- a/Scripts/build.sh
+++ b/Scripts/build.sh
@@ -23,12 +23,26 @@ 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
+
+ # 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`
+ if [ "$VERIFYERRORS" != '' ]
+ then
+ echo "error: Signing verification threw an error: $VERIFYERRORS"
+ echo "error: All distribution builds must be signed with the key used for all previous distribution signing!"
+ exit 1
+ fi
+
"${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}/Contents/Resources/SequelProTunnelAssistant" 2> /dev/null
codesign -s 'Sequel Pro Development' "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}${WRAPPER_SUFFIX}" 2> /dev/null
# Run a fake command to silence errors