-
Notifications
You must be signed in to change notification settings - Fork 41
/
build_test.sh
72 lines (53 loc) · 1.75 KB
/
build_test.sh
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
65
66
67
68
69
70
71
72
clear
echo "Cleaning Xcode derived data..."
rm -rf ~/Library/Developer/Xcode/DerivedData/*
echo "Building for iOS..."
OUTPUT=`xcodebuild -project ios/CountlyTestApp-iOS.xcodeproj/ -target "CountlyTestApp-iOS" -configuration Debug -sdk iphonesimulator build`
RESULT=`echo "$OUTPUT" | grep "BUILD SUC"`
if [ "$RESULT" != "** BUILD SUCCEEDED **" ]
then
echo "${OUTPUT}"
else
echo "${RESULT}"
fi
sudo rm -rf ios/build
echo "Building for iOS-Swift..."
OUTPUT=`xcodebuild -project ios-swift/CountlyTestApp-iOS-swift.xcodeproj/ -target "CountlyTestApp-iOS-swift" -configuration Debug -sdk iphonesimulator build`
RESULT=`echo "$OUTPUT" | grep "BUILD SUC"`
if [ "$RESULT" != "** BUILD SUCCEEDED **" ]
then
echo "${OUTPUT}"
else
echo "${RESULT}"
fi
sudo rm -rf ios-swift/build
echo "Building for tvOS..."
OUTPUT=`xcodebuild -project tvos/CountlyTestApp-tvOS.xcodeproj/ -target "CountlyTestApp-tvOS" -configuration Debug -sdk appletvsimulator build`
RESULT=`echo "$OUTPUT" | grep "BUILD SUC"`
if [ "$RESULT" != "** BUILD SUCCEEDED **" ]
then
echo "${OUTPUT}"
else
echo "${RESULT}"
fi
sudo rm -rf tvos/build
echo "Building for watchOS..."
OUTPUT=`xcodebuild -project watchos/CountlyTestApp-watchOS.xcodeproj/ -target "CountlyTestApp-watchOS WatchKit App" -configuration Debug -sdk watchsimulator build`
RESULT=`echo "$OUTPUT" | grep "BUILD SUC"`
if [ "$RESULT" != "** BUILD SUCCEEDED **" ]
then
echo "${OUTPUT}"
else
echo "${RESULT}"
fi
sudo rm -rf watchos/build
echo "Building for macOS..."
OUTPUT=`xcodebuild -project macos/CountlyTestApp-macOS.xcodeproj/ -target "CountlyTestApp-macOS" -configuration Debug build`
RESULT=`echo "$OUTPUT" | grep "BUILD SUC"`
if [ "$RESULT" != "** BUILD SUCCEEDED **" ]
then
echo "${OUTPUT}"
else
echo "${RESULT}"
fi
sudo rm -rf macos/build