fetch pull request and checkout to a local branch

This commit is contained in:
heliclei 2014-01-03 10:59:37 +08:00
parent e43ca98a94
commit 4549760f2c
1 changed files with 15 additions and 0 deletions

View File

@ -64,6 +64,21 @@ def main():
except:
traceback.format_exc()
#reset path to workspace root
os.system("cd " + os.environ['WORKSPACE']);
#fetch pull request to local repo
git_fetch_pr = "git fetch origin pull/" + str(pr_num) + "/head"
os.system(git_fetch_pr)
#checkout
git_checkout = "git checkout -b " + "pull" + str(pr_num) + " FETCH_HEAD"
os.system(git_checkout)
#update submodule
git_update_submodule = "git submodule update --init --force"
os.system(git_update_submodule)
#build
#TODO: support android-mac build currently
#TODO: add android-windows7 build