feat(task): 上传报告时一并打包配置文件

This commit is contained in:
XcantloadX 2025-07-11 22:12:32 +08:00
parent 63f792db2d
commit a8a5566f00
1 changed files with 9 additions and 0 deletions

View File

@ -180,6 +180,15 @@ def _save_bug_report(
zipf.write(file_path, arcname)
yield f"### 打包 log 文件:{arcname}"
# 打包 conf 文件夹
if os.path.exists('conf'):
for root, dirs, files in os.walk('conf'):
for file in files:
file_path = os.path.join(root, file)
arcname = os.path.join('conf', os.path.relpath(file_path, 'conf'))
zipf.write(file_path, arcname)
yield f"### 打包配置文件:{arcname}"
# 写出版本号
zipf.writestr('version.txt', version)