Improve user feedback in release-mac.sh

This commit is contained in:
Emil Lundberg 2017-12-20 12:56:06 +01:00
parent aab64e1d13
commit 8bf15a04bc
No known key found for this signature in database
GPG Key ID: 1342CC2B5CF84F44

View File

@ -9,6 +9,8 @@ APP_DIR_IN_TAR="."
version=$(python3 compute-version.py "${PROJECT_NAME}"-)
echo "Building release: ${version}"
rm -rf "deploy/unpacked"
mkdir -p deploy/unpacked
@ -18,6 +20,16 @@ tar xf "../${PROJECT_NAME}-${version}.app.tar"
cd "${APP_DIR_IN_TAR}"
mv "${PROJECT_NAME}.app" "${APP_NAME}.app"
echo "Running codesign..."
codesign --deep --verify --verbose --sign 'Developer ID Application' "${APP_NAME}.app"
echo "Running productbuild..."
productbuild --sign 'Developer ID Installer' --component "${APP_NAME}.app" /Applications/ "${PROJECT_NAME}-${version}-mac.pkg"
gpg --detach-sign "${PROJECT_NAME}-${version}-mac.pkg"
echo "Checking package signature..."
if pkgutil --check-signature "${PROJECT_NAME}-${version}-mac.pkg"; then
echo "Package is signed - generating PGP signature"
gpg --detach-sign "${PROJECT_NAME}-${version}-mac.pkg"
else
echo "Package is NOT signed!"
fi