Skip to content

Commit 887a6cf

Browse files
committed
chore: notarize macOS bundle only with --notarize argument, include team id
1 parent d26f128 commit 887a6cf

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

create-macos-app.sh

100644100755
Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4+
DO_NOTARIZE=false
5+
# parse args
6+
for arg in "$@"; do
7+
case "$arg" in
8+
--notarize) DO_NOTARIZE=true ;;
9+
esac
10+
done
11+
12+
413
### CONFIGURATION
514

615
APP_NAME="heidisql"
@@ -15,11 +24,8 @@ EXECUTABLE_TRG="${APP_DIR}/Contents/MacOS/${APP_NAME}"
1524
BREW_PREFIX="$(brew --prefix 2>/dev/null || echo "/opt/homebrew")"
1625

1726
# Your Developer ID identity, as shown by: security find-identity -v -p codesigning
18-
CODESIGN_IDENTITY="Developer ID Application: Ansgar Becker (???)"
19-
20-
# Your Apple ID email and team ID
21-
APPLE_ID_EMAIL="apple@???"
22-
TEAM_ID="???"
27+
TEAM_ID="QBD4CC6FH3"
28+
CODESIGN_IDENTITY="Developer ID Application: Ansgar Becker (${TEAM_ID})"
2329

2430
# Name for notarytool keychain profile (store once with notarytool store-credentials)
2531
NOTARY_PROFILE="notarytool-profile"
@@ -298,6 +304,11 @@ codesign --verify --deep --strict --verbose=2 "${APP_DIR}"
298304

299305
### ZIP, NOTARIZE, AND STAPLE
300306

307+
if ! $DO_NOTARIZE; then
308+
echo "Skip notarization (--notarize not given)"
309+
exit 0
310+
fi
311+
301312
ZIP_PATH="${APP_DIR}.zip"
302313
rm -f "${ZIP_PATH}"
303314
echo "Zipping app for notarization..."

0 commit comments

Comments
 (0)