Update generate-jsbindings.sh [ci skip]

This commit is contained in:
James Chen 2013-05-20 23:27:40 +08:00
parent 4d785fb28a
commit e57fdf87f0
1 changed files with 6 additions and 6 deletions

View File

@ -34,9 +34,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
COCOS2DX_ROOT="$DIR"/../..
TOJS_ROOT=$COCOS2DX_ROOT/tools/tojs
GENERATED_WORKTREE="$COCOS2DX_ROOT"/scripting/javascript/bindings/generated
REMOTE_AUTOGEN_BINDINGS_REPOSITORY="https://github.com/angeltown/cocos2dx-autogen-bindings.git"
REMOTE_COCOS2DX_REPOSITORY="https://github.com/angeltown/cocos2d-x.git"
COCOS2DX_PULL_BASE="dumganhar/cocos2d-x:travis"
REMOTE_AUTOGEN_BINDINGS_REPOSITORY="https://github.com/folecr/cocos2dx-autogen-bindings.git"
REMOTE_COCOS2DX_REPOSITORY="https://github.com/CocosRobot/cocos2d-x.git"
COCOS2DX_PULL_BASE="cocos2d/cocos2d-x:master"
sudo apt-get --force-yes --yes install python-yaml python-cheetah
@ -57,7 +57,7 @@ pushd "$GENERATED_WORKTREE"
git checkout -B master
#Set remotes
git remote add upstream https://${GH_TOKEN}@github.com/angeltown/cocos2dx-autogen-bindings.git 2> /dev/null > /dev/null
git remote add upstream https://${GH_TOKEN}@github.com/folecr/cocos2dx-autogen-bindings.git 2> /dev/null > /dev/null
echo "Delete all directories and files except '.git' and 'README'."
ls -a | grep -E -v ^\[.\]\{1,2\}$ | grep -E -v ^\.git$ | grep -E -v ^README$ | xargs -I{} rm -rf {}
@ -173,7 +173,7 @@ git add scripting/javascript/bindings/generated
git checkout -b "$COCOS_BRANCH"
git commit -m "$COMMITTAG : updating submodule reference to latest autogenerated bindings"
#Set remotes
git remote add upstream https://${GH_TOKEN}@github.com/angeltown/cocos2d-x.git 2> /dev/null > /dev/null
git remote add upstream https://${GH_TOKEN}@github.com/CocosRobot/cocos2d-x.git 2> /dev/null > /dev/null
# 6. In Cocos2D-X repo, Push the commit with updated submodule to "master" of the cocos2d-x repository
git push -fq upstream "$COCOS_BRANCH" 2> /dev/null
@ -192,7 +192,7 @@ if [ -z "${COCOS2DX_PULL_BASE+aaa}" ]; then
fi
# 7.
curl --user "angeltown:$GH_PASSWORD" --request POST --data "{ \"title\": \"$COMMITTAG : updating submodule reference to latest autogenerated bindings\", \"body\": \"\", \"head\": \"angeltown:${COCOS_BRANCH}\", \"base\": \"travis\"}" https://api.github.com/repos/dumganhar/cocos2d-x/pulls 2> /dev/null > /dev/null
curl --user "CocosRobot:$GH_PASSWORD" --request POST --data "{ \"title\": \"$COMMITTAG : updating submodule reference to latest autogenerated bindings\", \"body\": \"\", \"head\": \"CocosRobot:${COCOS_BRANCH}\", \"base\": \"master\"}" https://api.github.com/repos/cocos2d/cocos2d-x/pulls 2> /dev/null > /dev/null
# ${HUB} pull-request "$COMMITTAG : updating submodule reference to latest autogenerated bindings" -b "$COCOS2DX_PULL_BASE" -h "$COCOS_BRANCH"
popd