Build script: install to ~/Applications, DerivedData outside iCloud Documents

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maksarsanjeev
2026-10-06 19:58:48 +03:00
parent 7d76986bc0
commit 64ba36e710
2 changed files with 21 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
# Build BroV and install it to ~/Applications/BroV.app, then (re)launch it.
# DerivedData lives outside ~/Documents: iCloud adds Finder attributes there and codesign refuses them.
set -e
cd "$(dirname "$0")/../NotchBuddy"
D="$HOME/Library/Developer/Xcode/DerivedData/BroV"
xcodegen -q
xcodebuild -scheme BroV -configuration "${1:-Debug}" -derivedDataPath "$D" build | grep -E 'error:|BUILD (SUCCEEDED|FAILED)' || true
APP="$D/Build/Products/${1:-Debug}/BroV.app"
[ -d "$APP" ] || { echo "build failed"; exit 1; }
pkill -x BroV 2>/dev/null || true
mkdir -p "$HOME/Applications"
rm -rf "$HOME/Applications/BroV.app"
cp -R "$APP" "$HOME/Applications/BroV.app"
open "$HOME/Applications/BroV.app"
echo "BroV installed to ~/Applications/BroV.app and launched"