From 82863377e365f27dffe757dba7b25163a48aec1d Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 9 Dec 2009 00:13:37 +0000 Subject: - Fix a build issue on Distribution builds by including a link to libcrypto (thanks to Stuart!) - Improve debug code signing by also signing the tunnel assistant, and add code signing for Distribution builds. This addresses Issue #426. (assistant signing improvement also applied to nightlies) --- Scripts/build.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Scripts') 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 -- cgit v1.2.3