feat(release): 增强打包流程, 支持 --pin、.emod-ignore、.emod-package

- 新增 --pin/-P 参数: 保留当前版本号不打补丁, 用于失败后重试发布
- 新增 .emod-ignore: gitignore 风格的打包排除规则, 支持通配符和取反
- 新增 .emod-package: 自定义打包包含规则, 支持通配符匹配
- 添加 preflight_pack_dirs 预检: 在打包前验证行为包/资源包目录和清单文件
- 引入 PackDirs 结构体, 消除重复的目录拼接逻辑
- 修复 ZIP 条目路径在 Windows 使用反斜杠导致网易审核工具报错
- 新增 zip_entry_path 统一使用正斜杠
- 添加 10 个单元测试覆盖核心场景
This commit is contained in:
2026-05-04 01:31:44 +08:00
parent 2af7d3fc2f
commit 85aa369793
2 changed files with 827 additions and 72 deletions

View File

@@ -34,8 +34,12 @@ pub struct ReleaseArgs {
#[arg(short, long)]
pub path: Option<String>,
/// The version of the project
#[arg(short, long)]
#[arg(short, long, conflicts_with = "pin")]
pub ver: Option<String>,
/// Reuse the current version without auto-incrementing.
/// Useful when retrying after a failed release that already wrote new version files.
#[arg(short = 'P', long, conflicts_with = "ver")]
pub pin: bool,
}
#[derive(Args)]