12 lines
601 B
Bash
Executable File
12 lines
601 B
Bash
Executable File
#!/bin/zsh
|
|
set -euo pipefail
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
CONFIG="${CONFIGURATION:-Debug}"
|
|
DERIVED="${DERIVED_DATA_PATH:-$ROOT/.build}"
|
|
command -v xcodebuild >/dev/null || { echo "Xcode command line tools required" >&2; exit 1; }
|
|
xcodebuild -project "$ROOT/PHPGuard.xcodeproj" -scheme PHPGuard -configuration "$CONFIG" -derivedDataPath "$DERIVED" CODE_SIGNING_ALLOWED=NO build
|
|
APP="$DERIVED/Build/Products/$CONFIG/PHPGuard.app"
|
|
[[ -d "$APP" ]] || { echo "Built application not found: $APP" >&2; exit 1; }
|
|
echo "Built: $APP"
|
|
if [[ "${LAUNCH_AFTER_BUILD:-1}" == "1" ]]; then open "$APP"; fi
|