-
Notifications
You must be signed in to change notification settings - Fork 30
/
builder
executable file
·64 lines (55 loc) · 1.19 KB
/
builder
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
set -e
set -o pipefail
# Check for xcpretty
hash xcpretty 2>/dev/null || { gem install xcpretty; }
clean() {
xcodebuild \
-project MusicKit.xcodeproj \
-alltargets \
clean | xcpretty -cs
}
build() {
xcodebuild \
-project MusicKit.xcodeproj \
-scheme MusicKit | xcpretty -cs
xcodebuild \
-project MusicKit.xcodeproj \
-scheme MusicKitOSX | xcpretty -cs
xcodebuild \
-workspace MusicKit.xcworkspace \
-scheme PreviewGenerator | xcpretty -cs
}
test() {
# Always build the PreviewGenerator to verify CI
xcodebuild \
-workspace MusicKit.xcworkspace \
-scheme PreviewGenerator \
-destination 'platform=OS X,arch=x86_64' | xcpretty -cs
xcodebuild \
-project MusicKit.xcodeproj \
-scheme MusicKitOSX \
-destination 'platform=OS X,arch=x86_64' \
test | xcpretty -cs
xcodebuild \
-project MusicKit.xcodeproj \
-scheme MusicKit \
-destination 'platform=iOS Simulator,name=iPad Air,OS=latest' \
-destination 'platform=iOS Simulator,name=iPhone 6 Plus,OS=latest' \
-destination 'platform=iOS Simulator,name=iPad 2,OS=7.1' \
test | xcpretty -cs
}
case $1 in
clean)
clean
;;
build)
build
;;
test)
test
;;
*)
test
;;
esac