return time_version def get_svn_revision(): os.chdir(CD_ROOT) infos = collect_cmd_output(SVN_INFO) localutil.log(infos) split_datas = infos.split('\n') for item in split_datas: if item.startswith('Revision'): return item[10:len(item)] def main(): svn_update() # 拷贝新生成的ab到svn目录 copy_files() # svn上传 svn_upload_trunk() svn_update() svn_version = get_svn_revision() int_version = int(svn_version) str_version = str(int_version) # 生成bat和sh generate_cmd_files(str_version) if __name__ == "__main__": if not localutil.check_disable(): main()
# 创建两个线程 try: _thread.start_new_thread(childFunc, (2, )) _thread.start_new_thread(mainFunc, (4, )) except: localutil.log("Error: unable to start thread") while not allow and not failEnd: pass if failEnd: localutil.exit_fail() return localutil.log("build success") localutil.exit_success() # 配置命令编译参数 def append_argv(): global UNITY3D_COMPILE_CMD_FOR_PC append_args = localutil.get_current_argv_without_disable() UNITY3D_COMPILE_CMD_FOR_PC = UNITY3D_COMPILE_CMD_FOR_PC + append_args if __name__ == '__main__': if localutil.check_disable(): localutil.log("disable") else: append_argv() build()