2014-04-02 15:21:44 +08:00
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
def check_ret(ret):
|
2015-01-29 08:40:19 +08:00
|
|
|
if(ret != 0):
|
|
|
|
os.system('git checkout -B develop remotes/origin/develop')
|
|
|
|
os.system('git clean -xdf -f')
|
|
|
|
sys.exit(1)
|
2014-04-02 15:21:44 +08:00
|
|
|
|
|
|
|
branchs = ['develop', 'master']
|
|
|
|
for item in branchs:
|
2015-01-29 08:40:19 +08:00
|
|
|
os.system('git clean -xdf -f')
|
|
|
|
os.system('git checkout -B ' + item + ' remotes/origin/' + item)
|
|
|
|
os.system('git clean -xdf -f')
|
|
|
|
ret = os.system('git pull origin')
|
|
|
|
check_ret(ret)
|
|
|
|
ret = os.system('git submodule update --init --force')
|
|
|
|
check_ret(ret)
|
2014-04-02 15:21:44 +08:00
|
|
|
|
|
|
|
#back to develop
|
|
|
|
os.system('git checkout -B develop remotes/origin/develop')
|
|
|
|
os.system('git clean -xdf -f')
|