axmol/tools/jenkins-scripts/slave-scripts/templates/ios-build.sh

21 lines
957 B
Bash
Raw Normal View History

2015-07-07 13:42:44 +08:00
#!/bin/bash
mycocos=tools/cocos2d-console/bin/cocos
$mycocos new -l $1
if [ $1 = "cpp" ];then
schemename="MyCppGame-mobile"
projectpath="MyCppGame/proj.ios_mac/MyCppGame.xcodeproj"
elif [ $1 = "lua" ];then
schemename="MyLuaGame-mobile"
projectpath="MyLuaGame/frameworks/runtime-src/proj.ios_mac/MyLuaGame.xcodeproj"
elif [ $1 = "js" ];then
schemename="MyJSGame-mobile"
projectpath="MyJSGame/frameworks/runtime-src/proj.ios_mac/MyJSGame.xcodeproj"
fi
echo "start building..."
2015-07-07 14:57:25 +08:00
xcodebuild -project $projectpath -target "${schemename}" -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" clean | xcpretty
xcodebuild -project $projectpath -target "${schemename}" -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" build | xcpretty
2015-07-07 11:02:21 +08:00
#the following commands must not be removed
2015-07-07 14:57:25 +08:00
xcodebuild -project $projectpath -target "${schemename}" -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)" build