grammargem/scripts/sign-notarize.sh
BigMarc f5faa27f88 GrammaGem — open-source, on-device macOS writing assistant
Native SwiftUI menu-bar app: global hotkey → capture selected text (AX API /
clipboard fallback) → grammar (Harper) / local AI (MLX) → replace in place.
Free/paid entitlement gate + Lemon Squeezy device-cap licensing, $0 marginal
cost per user. Heavyweight engines behind protocol stubs so it builds out of the box.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 13:56:26 +02:00

34 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Codesign (Hardened Runtime) + notarize + staple the GrammaGem.app bundle.
# Requires the Apple Developer Program ($99/yr) — a FIXED cost, not per-user.
#
# Prereqs (set as env vars or fill in):
# DEV_ID e.g. "Developer ID Application: Your Name (TEAMID)"
# KEYCHAIN_PROFILE a stored notarytool profile (xcrun notarytool store-credentials)
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
APP="$ROOT/dist/GrammaGem.app"
ENTITLEMENTS="$ROOT/AppSupport/GrammaGem.entitlements"
: "${DEV_ID:?Set DEV_ID to your Developer ID Application identity}"
: "${KEYCHAIN_PROFILE:?Set KEYCHAIN_PROFILE to your stored notarytool profile}"
echo "▸ Codesigning with Hardened Runtime…"
codesign --force --deep --options runtime \
--entitlements "$ENTITLEMENTS" \
--sign "$DEV_ID" \
"$APP"
echo "▸ Zipping for notarization…"
ZIP="$ROOT/dist/GrammaGem.zip"
ditto -c -k --keepParent "$APP" "$ZIP"
echo "▸ Submitting to Apple notary service…"
xcrun notarytool submit "$ZIP" --keychain-profile "$KEYCHAIN_PROFILE" --wait
echo "▸ Stapling ticket…"
xcrun stapler staple "$APP"
echo "✓ Signed, notarized, and stapled: $APP"