forked from pxscene/pxCore2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_osx.sh
executable file
·42 lines (41 loc) · 988 Bytes
/
build_osx.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
#!/bin/sh
BUILDLOGS=$TRAVIS_BUILD_DIR/logs/build_logs
checkError()
{
if [ "$1" -ne 0 ]
then
echo "Build failed with errors !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
if [ "$2" -eq 1 ]
then
cat $BUILDLOGS
fi
exit 1;
fi
}
cd $TRAVIS_BUILD_DIR/src
cd $TRAVIS_BUILD_DIR;
if [ "$TRAVIS_PULL_REQUEST" = "false" ]
then
echo "***************************** Building pxcore ****" >> $BUILDLOGS
xcodebuild clean
xcodebuild -scheme "pxCore Static Library">>$BUILDLOGS 2>&1;
checkError $? 0
else
echo "***************************** Building pxcore ****"
xcodebuild clean
xcodebuild -scheme "pxCore Static Library" 1>>$BUILDLOGS;
checkError $? 1
fi
cd $TRAVIS_BUILD_DIR/examples/pxScene2d/src;
if [ "$TRAVIS_PULL_REQUEST" = "false" ]
then
echo "***************************** Building pxscene app ***" >> $BUILDLOGS
make clean;
make -j>>$BUILDLOGS 2>&1
checkError $? 0
else
echo "***************************** Building pxscene app ***"
make clean;
make -j 1>>$BUILDLOGS
checkError $? 0
fi