diff options
author | Tobias Markmann <tm@ayena.de> | 2016-06-30 18:46:32 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-06-30 18:46:49 (GMT) |
commit | a1be6105b97dddc1e03db0075f6ca3fc47fa8e1d (patch) | |
tree | 9abb38c4966a2b7871257b0f2e5df90764ce70c7 /Swift/Packaging/MacOSX | |
parent | 82dd5a11131b3bd3641316b87aa279d806c970b0 (diff) | |
download | swift-a1be6105b97dddc1e03db0075f6ca3fc47fa8e1d.zip swift-a1be6105b97dddc1e03db0075f6ca3fc47fa8e1d.tar.bz2 |
Add initial support for code signing on OS X
See DEVELOPMENT.md for instructions.
Test-Information:
Tested using a self-signed code signing certificate created
using Keychain Access.app.
Compared the output of 'codesign -vvv -d' on Swift.app with
preinstall apps. The output looks much the same except for
the signing authority.
Change-Id: Idbb3209ad917091c371ced61ec8a77e3e5d18884
Diffstat (limited to 'Swift/Packaging/MacOSX')
-rwxr-xr-x | Swift/Packaging/MacOSX/package.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Swift/Packaging/MacOSX/package.sh b/Swift/Packaging/MacOSX/package.sh index a13a03c..7a63237 100755 --- a/Swift/Packaging/MacOSX/package.sh +++ b/Swift/Packaging/MacOSX/package.sh @@ -4,6 +4,7 @@ APP=$1 TEMPLATE=$2 TARGET=$3 QTDIR=$4 +CODESIGN_IDENTITY=$5 if [[ ! -f "$TEMPLATE" || ! -d "$APP" || ! -d "$QTDIR" || -z "$TARGET" ]]; then echo "Error" @@ -30,6 +31,11 @@ rm "$WC_DIR"/`basename $APP`/Contents/PlugIns/bearer/*.dylib # Remove debugging symbols from the application bundle rm -rf "$WC_DIR"/`basename $APP`/Contents/MacOS/*.dSYM +# Codesign the app bundle if requested by caller +if [ ! -z "$CODESIGN_IDENTITY" ]; then + codesign --verbose --force --deep --sign "$CODESIGN_IDENTITY" "$WC_DIR"/`basename $APP` +fi + hdiutil detach "$WC_DIR" -quiet -force rm -f $TARGET hdiutil convert "$WC_DMG" -quiet -format UDZO -imagekey zlib-level=9 -o "$TARGET" |