SPB Git forge
3commits 1branches 0releases
2.9 MBsize
maindefault branch
1 h agolast push
HTML 57.2% Shell 19.1% Python 11.2% CSS 7.4% JavaScript 5.1%
2.6 KB · 48 lines shellscript
Raw Blame History
1#!/bin/bash2# release-maclustr-macos.sh — chaîne de release de l'app macOS MacLustr (maclustr-v2) depuis le laptop3# quand la licence Xcode n'est pas acceptée (swift/xcodebuild/notarytool bloqués) :4#   1. build + bundle avec la chaîne Command Line Tools (SDK macOS 26)5#   2. signature Developer ID + DMG sur le laptop (codesign/hdiutil ne dépendent pas de la licence)6#   3. notarisation + staple sur M4M64a (Xcode 26.6, clé API App Store Connect L379BDKR69)7#   4. rapatriement du DMG stapled, installation dans /Applications (optionnel : --install)8# Usage : release-maclustr-macos.sh [--install] [--skip-build]9set -euo pipefail10PROJ="$HOME/Desktop/Cluster/CLUSTER_APPLE/maclustr-v2"11SWIFT=/Library/Developer/CommandLineTools/usr/bin/swift12SDK=/Library/Developer/CommandLineTools/SDKs/MacOSX26.sdk13NODE=M4M64a14KEY=~/.appstoreconnect/private_keys/AuthKey_L379BDKR69.p815KEY_ID=L379BDKR6916ISSUER=013e761f-e05c-4d93-a50b-f3d960adae4a17INSTALL=0; SKIP_BUILD=018for a in "$@"; do case "$a" in --install) INSTALL=1;; --skip-build) SKIP_BUILD=1;; esac; done1920cd "$PROJ"21VERSION=$(grep -E '^VERSION=' build.sh | head -1 | cut -d'"' -f2)22echo "=== MacLustr macOS $VERSION ==="23if [ "$SKIP_BUILD" = 0 ]; then24  echo ">> build + bundle (CLT swift, SDK macOS 26)"25  SWIFT="$SWIFT" SDKROOT="$SDK" ./build.sh app 2>&1 | grep -E "error|Build complete|App bundle" | tail -526fi27echo ">> signature Developer ID"28./build.sh sign 2>&1 | grep -E "Signing|valid|error" | tail -329echo ">> DMG"30./build.sh dmg 2>&1 | grep -E "created|error" | tail -231[ -f MacLustr.dmg ] || { echo "DMG absent"; exit 1; }32echo ">> notarisation sur $NODE"33scp -q MacLustr.dmg "$NODE:/tmp/MacLustr-$VERSION.dmg"34ssh "$NODE" "xcrun notarytool submit /tmp/MacLustr-$VERSION.dmg --key $KEY --key-id $KEY_ID --issuer $ISSUER --wait 2>&1 | grep -E 'id:|status:' | tail -2 && xcrun stapler staple /tmp/MacLustr-$VERSION.dmg 2>&1 | tail -1"35scp -q "$NODE:/tmp/MacLustr-$VERSION.dmg" MacLustr.dmg36echo ">> staple de l'app locale"37# le ticket est aussi valable pour l'app : on l'extrait du DMG notarisé38MNT=$(hdiutil attach -nobrowse -readonly MacLustr.dmg | awk -F'\t' '/Volumes/{print $NF}')39rm -rf MacLustr.app && cp -R "$MNT/MacLustr.app" MacLustr.app && hdiutil detach "$MNT" -quiet40spctl -a -vv MacLustr.app 2>&1 | tail -241if [ "$INSTALL" = 1 ]; then42  echo ">> installation dans /Applications"43  pkill -x MacLustr 2>/dev/null || true44  rm -rf /Applications/MacLustr.app && cp -R MacLustr.app /Applications/MacLustr.app45  open /Applications/MacLustr.app && echo "MacLustr $VERSION lancée"46fi47echo "OK : $PROJ/MacLustr.dmg ($VERSION, notarisé, stapled)"48