-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·31 lines (29 loc) · 926 Bytes
/
Copy pathbuild.sh
File metadata and controls
executable file
·31 lines (29 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Erimil build script
# Usage: ./build.sh [build|clean|run]
set -e
cd "$(dirname "$0")"
PROJECT="./Erimil/Erimil.xcodeproj"
SCHEME="Erimil"
case "${1:-build}" in
build)
echo "🔨 Building..."
xcodebuild build -project "$PROJECT" -scheme "$SCHEME" 2>&1 | tail -3
;;
clean)
echo "🧹 Clean & Build..."
xcodebuild clean build -project "$PROJECT" -scheme "$SCHEME" 2>&1 | tail -3
;;
run)
echo "🚀 Build & Run..."
xcodebuild build -project "$PROJECT" -scheme "$SCHEME" 2>&1 | tail -3
open "$(xcodebuild -project "$PROJECT" -scheme "$SCHEME" -showBuildSettings 2>/dev/null | grep -m1 ' BUILT_PRODUCTS_DIR' | awk '{print $3}')/Erimil.app"
;;
*)
echo "Usage: $0 [build|clean|run]"
echo " build Incremental build (default)"
echo " clean Clean & rebuild (use when changes don't take effect)"
echo " run Build & launch app"
exit 1
;;
esac