build: use branded release package names

This commit is contained in:
chengma
2026-07-08 14:21:31 +08:00
parent ebb1f8a354
commit 5469479f3e
6 changed files with 55 additions and 22 deletions
+7 -1
View File
@@ -3,7 +3,7 @@ id: T-558
title: release 发布目录与 zip 使用中文品牌名
phase: 8
deps: [T-540, T-537, T-538]
status: TODO
status: DONE
created: 2026-07-08
---
@@ -51,3 +51,9 @@ T-540 已经把版本号收口到 `app/version.py`,并让构建脚本统一生
## 执行记录
- 2026-07-08:`scripts\build_exe.ps1` 的正式 release 命名改为 `$appName$appVersion`,生成目录 `release\蝦皮圈優化助手<APP_VERSION>\`,zip 改为 `release\蝦皮圈優化助手<APP_VERSION>.zip`;`dist\cmshopee\cmshopee.exe` 与 `_internal\` onedir 中间产物保持不变。
- 2026-07-08:同步更新 `docs/packaging.md`、`docs/03-tech-stack.md`、`docs/troubleshooting.md`,明确正式发包名使用中文品牌名,用户更新仍覆盖程序文件和 `_internal\` 并保留 `data\`。
- 2026-07-08:更新 `tests/test_packaging.py`,断言构建脚本使用 `$appName$appVersion` 和 `$releaseName.zip`,并防止旧的 `$appCodeName-$appVersion` / `-portable.zip` 命名回归。
- 2026-07-08:实跑打包时发现 Windows `Compress-Archive` 可能在 PyInstaller 刚复制 `_internal\base_library.zip` 后遇到短暂文件占用;已为压缩发布包步骤增加 5 次短重试,避免最后一步偶发失败。
- 验证通过:`python -m ruff check app tests main.py`、`py -3.10 -m compileall app main.py`、`py -3.10 -m unittest discover -s tests`、`powershell -ExecutionPolicy Bypass -File scripts\build_exe.ps1`、`git diff --check`。
- 打包实测输出:`release\蝦皮圈優化助手0.1.1\` 和 `release\蝦皮圈優化助手0.1.1.zip`;发布目录包含 `_internal`、`cmshopee.exe`、`README.txt`、`version.txt`,未发现 `data`、配置、DB、图片、日志或登录态目录。