Expose project scripts and launch after building
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user