Expose project scripts and launch after building

This commit is contained in:
Mark Gregory
2026-11-16 13:22:55 +00:00
parent 2238df4631
commit 87cdc990c3
8 changed files with 94 additions and 76 deletions
Executable
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
set -euo pipefail
cd "$(dirname "$0")"
configuration="${1:-Debug}"
launch="${2:-}"
if [[ "$#" -gt 2 || ( -n "$launch" && "$launch" != "--no-launch" ) ]]; then
echo "Usage: $0 [Debug|Release] [--no-launch]" >&2
exit 2
fi
case "$configuration" in
Debug|Release) ;;
*) echo "Usage: $0 [Debug|Release] [--no-launch]" >&2; exit 2 ;;
esac
base="${AISTUDIO_BUILD_ROOT:-/private/tmp/AIStudio-build-$(id -u)}"
mkdir -p "$base"
xcodebuild CODE_SIGN_IDENTITY=- CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM= -project AIStudio.xcodeproj -scheme AIStudio -configuration "$configuration" \
-destination 'platform=macOS,arch=arm64' -derivedDataPath "$base/Derived" \
-clonedSourcePackagesDirPath "$base/Packages" -disablePackageRepositoryCache build
app="$base/Derived/Build/Products/$configuration/AIStudio.app"
printf 'App: %s\n' "$app"
if [[ "$launch" != "--no-launch" ]]; then
open "$app"
fi