Merge pull request #6729 from lmskater/add-external-lib-to-ci-release

[Jenkins][ci skip] Add external lib to ci release build
This commit is contained in:
minggo 2014-05-14 17:41:19 +08:00
commit 9c6e612c1f
1 changed files with 33 additions and 0 deletions

View File

@ -47,6 +47,36 @@ def make_temp_dir():
print cmd
os.system(cmd)
def check_current_3rd_libs(branch):
#get current_libs config
backup_files = range(2)
current_files = range(2)
config_file_paths = ['external/config.json','templates/lua-template-runtime/runtime/config.json']
if (branch == 'v2'):
config_file_paths = ['external/config.json']
for i, config_file_path in enumerate(config_file_paths):
if not os.path.isfile(config_file_path):
raise Exception("Could not find 'external/config.json'")
with open(config_file_path) as data_file:
data = json.load(data_file)
current_3rd_libs_version = data["version"]
filename = current_3rd_libs_version + '.zip'
node_name = os.environ['NODE_NAME']
backup_file = '../../../cocos-2dx-external/node/' + node_name + '/' + filename
backup_files[i] = backup_file
current_file = filename
current_files[i] = current_file
if os.path.isfile(backup_file):
copy(backup_file, current_file)
#run download-deps.py
os.system('python download-deps.py -r no')
#backup file
for i, backup_file in enumerate(backup_files):
current_file = current_files[i]
copy(current_file, backup_file)
def main():
#get tag
tag = os.environ['tag']
@ -91,6 +121,9 @@ def main():
if(ret != 0):
return(2)
#copy check_current_3rd_libs
check_current_3rd_libs(branch)
#build
#TODO: add android-linux build
#TODO: add mac build