mirror of https://github.com/axmolengine/axmol.git
Merge pull request #1514 from CocosRobot/update-jenkins-script
Updated jenkins script for auto-gen jsbinding codes.
This commit is contained in:
commit
f0ee1851fa
|
@ -28,12 +28,32 @@
|
|||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
COCOS2DX_ROOT="$DIR"/../../../..
|
||||
GENERATED_WORKTREE="$COCOS2DX_ROOT"/scripting/javascript/bindings/generated
|
||||
|
||||
if [ -z "${HUB+aaa}" ]; then
|
||||
# ... if HUB is not set, use "$HOME/bin/hub"
|
||||
HUB="$HOME/bin/hub"
|
||||
fi
|
||||
|
||||
# Update local repo
|
||||
pushd "$COCOS2DX_ROOT"
|
||||
|
||||
git checkout -f
|
||||
git checkout gles20
|
||||
git pull upstream gles20
|
||||
rm -rf "$GENERATED_WORKTREE"
|
||||
git submodule update --init
|
||||
|
||||
popd
|
||||
|
||||
pushd "$GENERATED_WORKTREE"
|
||||
|
||||
git checkout -f
|
||||
git checkout master
|
||||
git pull origin master
|
||||
|
||||
popd
|
||||
|
||||
# Exit on error
|
||||
set -e
|
||||
|
||||
|
@ -71,7 +91,7 @@ ELAPSEDSECS=`date +%s`
|
|||
echo Using "$ELAPSEDSECS" in the branch names for pseudo-uniqueness
|
||||
|
||||
GENERATED_BRANCH=autogeneratedbindings_"$ELAPSEDSECS"
|
||||
GENERATED_WORKTREE="$COCOS2DX_ROOT"/scripting/javascript/bindings/generated
|
||||
|
||||
|
||||
# 2. In JSBindings repo, Check if there are any files that are different from the index
|
||||
|
||||
|
@ -107,7 +127,7 @@ fi
|
|||
set -e
|
||||
|
||||
# 3. In JSBindings repo, Check out a branch named "autogeneratedbindings" and commit the auto generated bindings to it
|
||||
git checkout origin/master -b "$GENERATED_BRANCH"
|
||||
git checkout -b "$GENERATED_BRANCH"
|
||||
git add --verbose README cocos2dx.cpp cocos2dx.hpp cocos2dxapi.js
|
||||
git commit --verbose -m "$COMMITTAG : autogenerated bindings"
|
||||
|
||||
|
@ -137,7 +157,7 @@ pushd "${DIR}"
|
|||
# 5. In Cocos2D-X repo, Checkout a branch named "updategeneratedsubmodule" Update the submodule reference to point to the commit with generated bindings
|
||||
cd "${COCOS2DX_ROOT}"
|
||||
git add scripting/javascript/bindings/generated
|
||||
git checkout origin/gles20 -b "$COCOS_BRANCH"
|
||||
git checkout -b "$COCOS_BRANCH"
|
||||
git commit -m "$COMMITTAG : updating submodule reference to latest autogenerated bindings"
|
||||
|
||||
# 6. In Cocos2D-X repo, Push the commit with updated submodule to "gles20" of the cocos2d-x repository
|
||||
|
|
Loading…
Reference in New Issue