From bb190fe78ac2fdb7343f0cadfe7dcfcda9d92724 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 25 Mar 2014 16:24:08 +0800 Subject: [PATCH] [ci] Updates travis scripts. --- tools/travis-scripts/generate-bindings.sh | 7 +++++-- tools/travis-scripts/generate-cocosfiles.sh | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/travis-scripts/generate-bindings.sh b/tools/travis-scripts/generate-bindings.sh index 19978804e3..d586e61d09 100755 --- a/tools/travis-scripts/generate-bindings.sh +++ b/tools/travis-scripts/generate-bindings.sh @@ -23,6 +23,7 @@ ELAPSEDSECS=`date +%s` COCOS_BRANCH="update_lua_bindings_$ELAPSEDSECS" COCOS_ROBOT_REMOTE="https://${GH_USER}:${GH_PASSWORD}@github.com/${GH_USER}/cocos2d-x.git" PULL_REQUEST_REPO="https://api.github.com/repos/cocos2d/cocos2d-x/pulls" +FETCH_REMOTE_BRANCH="develop" # Exit on error set -e @@ -88,12 +89,14 @@ pushd "$PROJECT_ROOT" git status echo -echo Comparing with HEAD ... +echo Comparing with origin HEAD ... echo +git fetch origin ${FETCH_REMOTE_BRANCH} + # Don't exit on non-zero return value set +e -git diff --stat --exit-code +git diff FETCH_HEAD --stat --exit-code DIFF_RETVAL=$? if [ $DIFF_RETVAL -eq 0 ] diff --git a/tools/travis-scripts/generate-cocosfiles.sh b/tools/travis-scripts/generate-cocosfiles.sh index 1014bc303e..ec43dc8300 100755 --- a/tools/travis-scripts/generate-cocosfiles.sh +++ b/tools/travis-scripts/generate-cocosfiles.sh @@ -6,6 +6,7 @@ PROJECT_ROOT="$DIR"/../.. COMMITTAG="[AUTO][ci skip]: updating cocos2dx_files.json" PUSH_REPO="https://api.github.com/repos/cocos2d/cocos2d-x/pulls" OUTPUT_FILE_PATH="${PROJECT_ROOT}/templates/cocos2dx_files.json" +FETCH_REMOTE_BRANCH="develop" # Exit on error set -e @@ -51,12 +52,14 @@ pushd "$PROJECT_ROOT" git status echo -echo Comparing with HEAD ... +echo Comparing with origin HEAD ... echo +git fetch origin ${FETCH_REMOTE_BRANCH} + # Don't exit on non-zero return value set +e -git diff --stat --exit-code +git diff FETCH_HEAD --stat --exit-code DIFF_RETVAL=$? if [ $DIFF_RETVAL -eq 0 ]