forked from uber/ios-snapshot-test-case
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·52 lines (47 loc) · 1.78 KB
/
build.sh
File metadata and controls
executable file
·52 lines (47 loc) · 1.78 KB
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
#!/bin/sh
set -eu
function ci_lib() {
NAME=$1
xcodebuild -project FBSnapshotTestCase.xcodeproj \
-scheme "FBSnapshotTestCase iOS" \
-destination "platform=iOS Simulator,name=${NAME}" \
-sdk iphonesimulator \
build-for-testing
xcodebuild -project FBSnapshotTestCase.xcodeproj \
-scheme "FBSnapshotTestCase iOS" \
-destination "platform=iOS Simulator,name=${NAME}" \
-sdk iphonesimulator \
test-without-building
}
function ci_demo() {
NAME=$1
pushd FBSnapshotTestCaseDemo
pod install
xcodebuild -workspace FBSnapshotTestCaseDemo.xcworkspace \
-scheme FBSnapshotTestCaseDemo \
-destination "platform=iOS Simulator,name=${NAME}" \
build-for-testing
xcodebuild -workspace FBSnapshotTestCaseDemo.xcworkspace \
-scheme FBSnapshotTestCaseDemo \
-destination "platform=iOS Simulator,name=${NAME}" \
test-without-building
popd
}
function ci_carthage_demo() {
NAME=$1
pushd iOSSnapshotTestCaseCarthageDemo
carthage bootstrap
xcodebuild -project iOSSnapshotTestCaseCarthageDemo.xcodeproj \
-scheme iOSSnapshotTestCaseCarthageDemo \
-destination "platform=iOS Simulator,name=${NAME}" \
build-for-testing
xcodebuild -project iOSSnapshotTestCaseCarthageDemo.xcodeproj \
-scheme iOSSnapshotTestCaseCarthageDemo \
-destination "platform=iOS Simulator,name=${NAME}" \
test-without-building
popd
}
ci_lib "iPhone 7" && ci_demo "iPhone 7"
ci_lib "iPhone X" && ci_demo "iPhone X"
ci_lib "iPhone 7" && ci_carthage_demo "iPhone 7"
ci_lib "iPhone X" && ci_carthage_demo "iPhone X"