def prepareFunc(): shutil.copyfile(localconfig.REX_TABLE_BYTE_FILE_ROOT, localconfig.REX_TABLE_BYTE_AUTO_FIX_FILE_ROOT) localutil.execute("for /d %a in (" + localconfig.GIT_PROJECT_PACK_PC_CD_ROOT + localconfig.GIT_PROJECT_COMPRESS_NAME + "*) do rd /s/q %a")
def main(): localutil.log("开始压缩复制文件") localutil.execute("C:/Windows/Rar.exe a -ag" + localconfig.BUILD_TIMESTAMP + " -ep1 -df -m1 " + localconfig.SRC_EXE_PATH + localconfig.GIT_PROJECT_COMPRESS_NAME + " " + localconfig.GIT_PROJECT_PACK_PC_CD_ROOT + localconfig.GIT_PROJECT_COMPRESS_NAME + "*/") # 上面一步到位 # shutil.copyfile(localconfig.GIT_PROJECT_PACK_PC_CD_ROOT + localconfig.GIT_PROJECT_COMPRESS_NAME + localconfig.BUILD_TIMESTAMP + ".rar", # localconfig.SRC_EXE_PATH + localconfig.GIT_PROJECT_COMPRESS_NAME + localconfig.BUILD_TIMESTAMP + ".rar") localutil.log("结束压缩复制文件")
def svn_upload_trunk(): os.chdir(CD_ROOT) svn_status = collect_cmd_output(SVN_STATUS_COMMAD) cmds = generate_svn_commit_all_cmd(svn_status) # 执行删除 for cmd_item in cmds[1]: localutil.execute(cmd_item) # 执行添加 for cmd_item in cmds[0]: localutil.execute(cmd_item) # 执行commit localutil.execute(SVN_COMMIT_TRUNK)
def svn_update(): localutil.log("先svn的trunk更到最新") os.chdir(CD_ROOT) localutil.execute(SVN_UPDATE)
def kill_unity(): localutil.log("force kill unity") localutil.execute('taskkill /f /im unity.exe')
def unity_buildab(): localutil.log("build assetbundle") if localutil.execute(localconfig.UNITY3D_BUILDAB_CMD_FOR_PC): localutil.log("Execute compile cmd failed")
def unity_compile(): localutil.log("compile unity") if localutil.execute(UNITY3D_COMPILE_CMD_FOR_PC): localutil.log("Execute opne cmd failed")
def open_unity(): localutil.log("open unity") if localutil.execute(localconfig.UNITY3D_OPEN_CMD): localutil.log("Execute open cmd failed")
def compress_test(): localutil.execute("C:/Windows/Rar.exe a -r- -ag" + localconfig.BUILD_TIMESTAMP + " -ep1 -df D:/Test/ACT_PC_ D:/Test/p*/")