SPB Git

spb/metrika

Public

Stata-class statistics, GPU-accelerated by Apple Silicon. Native Swift — no Electron, no Python runtime, no compromises.

2.2 KB · 76 lines shellscript
1#!/bin/bash2#3#  release.sh — Metrika4#  Author:  Simon-Pierre Boucher5#  Contact: contact@spboucher.ai6#  Copyright © 2026 Simon-Pierre Boucher. All rights reserved.7#8#  Release pipeline (CLAUDE.md §10): archive → export → verify → DMG →9#  sign → notarize → staple. The team ID and keychain-profile NAME are10#  configuration, not credentials — the actual Apple ID and app-specific11#  password live only in the login keychain (stored once via12#  `xcrun notarytool store-credentials "MacLustr-Notarize"`).13#14set -euo pipefail1516APP="Metrika"17SCHEME="Metrika"18BUILD_DIR="build"19DMG="${APP}.dmg"20TEAM_ID="3YM54G49SN"21NOTARY_PROFILE="MacLustr-Notarize"22SIGN_IDENTITY="Developer ID Application: Simon-Pierre Boucher (${TEAM_ID})"2324cd "$(dirname "$0")/.."25rm -rf "$BUILD_DIR" "$DMG"2627# 0. Regenerate the Xcode project and the icon from their sources.28xcodegen generate29./scripts/make_icns.sh3031# 1. Archive (Developer ID signing; mlx-swift needs the plugin skip).32xcodebuild -project "$APP.xcodeproj" -scheme "$SCHEME" \33  -configuration Release -arch arm64 \34  -archivePath "$BUILD_DIR/$APP.xcarchive" \35  -skipPackagePluginValidation \36  DEVELOPMENT_TEAM="$TEAM_ID" \37  CODE_SIGN_IDENTITY="$SIGN_IDENTITY" \38  CODE_SIGN_STYLE=Manual \39  OTHER_CODE_SIGN_FLAGS="--timestamp --options runtime" \40  archive4142# 2. Export with Developer ID43xcodebuild -exportArchive \44  -archivePath "$BUILD_DIR/$APP.xcarchive" \45  -exportOptionsPlist scripts/ExportOptions.plist \46  -exportPath "$BUILD_DIR/export"4748# 3. Verify hardened runtime + entitlements49codesign -dv --verbose=4 "$BUILD_DIR/export/$APP.app"50codesign --verify --deep --strict "$BUILD_DIR/export/$APP.app"5152# 4. Build DMG (create-dmg, background art in Assets/DMG/)53create-dmg \54  --volname "$APP" \55  --window-size 540 380 \56  --icon-size 128 \57  --icon "$APP.app" 130 190 \58  --app-drop-link 400 190 \59  --background "Assets/DMG/background.png" \60  --no-internet-enable \61  "$DMG" "$BUILD_DIR/export/"6263# 5. Sign the DMG itself64codesign --sign "$SIGN_IDENTITY" --timestamp "$DMG"6566# 6. Notarize & wait67xcrun notarytool submit "$DMG" \68  --keychain-profile "$NOTARY_PROFILE" \69  --wait7071# 7. Staple72xcrun stapler staple "$DMG"73xcrun stapler validate "$DMG"7475echo "✅ $DMG notarized and stapled."76
Files · f298d7ba7e5e8f5ac0bd0a73189f34de8af32036
Menu

Theme