diff --git a/dev-util/release-mac.sh b/dev-util/release-mac.sh index 3c8bfd08..79e564a3 100755 --- a/dev-util/release-mac.sh +++ b/dev-util/release-mac.sh @@ -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