From 1aad7e927db0160bbe407e30be68443abef56c48 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 13 May 2013 20:43:28 +0800 Subject: [PATCH] fixed #2105: Refactoring travis build script. --- .travis.yml | 4 +--- tools/travis-scripts/run-script.sh | 11 +++++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9915beddd0..86a98e8e24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,7 @@ env: # - GEN_JSB=YES - PLATFORM=linux DEBUG=1 - PLATFORM=nacl DEBUG=1 - - PLATFORM=android SAMPLE_LANG=Cpp APPNAME=HelloCpp - - PLATFORM=android SAMPLE_LANG=Javascript APPNAME=TestJavascript - - PLATFORM=android SAMPLE_LANG=Lua APPNAME=TestLua + - PLATFORM=android branches: only: - master diff --git a/tools/travis-scripts/run-script.sh b/tools/travis-scripts/run-script.sh index 030a99bbac..51148702d1 100755 --- a/tools/travis-scripts/run-script.sh +++ b/tools/travis-scripts/run-script.sh @@ -13,9 +13,16 @@ if [ "$GEN_JSB"x = "YES"x ]; then ./generate-jsbindings.sh fi -if [ "$PLATFORM"x = "android"x ]; then - cd $COCOS2DX_ROOT/samples/$SAMPLE_LANG/$APPNAME/proj.android +build_android() +{ + cd $COCOS2DX_ROOT/samples/$1/$2/proj.android ./build_native.sh +} + +if [ "$PLATFORM"x = "android"x ]; then + build_android Cpp HelloCpp + build_android Javascript TestJavascript + build_android Lua TestLua fi if [ "$PLATFORM"x = "nacl"x ]; then