From aab64e1d1395873f166e0f719991ff0a53bdadcd Mon Sep 17 00:00:00 2001 From: Emil Lundberg Date: Tue, 19 Dec 2017 17:57:14 +0100 Subject: [PATCH] Add dev-util/release-mac.sh --- dev-util/release-mac.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 dev-util/release-mac.sh diff --git a/dev-util/release-mac.sh b/dev-util/release-mac.sh new file mode 100755 index 00000000..3c8bfd08 --- /dev/null +++ b/dev-util/release-mac.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Exit on error +set -e + +PROJECT_NAME='yubioath-desktop' +APP_NAME='Yubico Authenticator' +APP_DIR_IN_TAR="." + +version=$(python3 compute-version.py "${PROJECT_NAME}"-) + +rm -rf "deploy/unpacked" + +mkdir -p deploy/unpacked +cd deploy/unpacked + +tar xf "../${PROJECT_NAME}-${version}.app.tar" +cd "${APP_DIR_IN_TAR}" +mv "${PROJECT_NAME}.app" "${APP_NAME}.app" + +codesign --deep --verify --verbose --sign 'Developer ID Application' "${APP_NAME}.app" +productbuild --sign 'Developer ID Installer' --component "${APP_NAME}.app" /Applications/ "${PROJECT_NAME}-${version}-mac.pkg" +gpg --detach-sign "${PROJECT_NAME}-${version}-mac.pkg"