mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-09-18 10:54:55 +08:00
feat(release):完成双 release 运维闭环
This commit is contained in:
@@ -34,6 +34,42 @@ bat res pull --auto-discover --watch --interval 1h \
|
||||
|
||||
资源下载默认使用 8 个独立 worker,允许范围为 `1..=256`。worker 完成当前 URL 后立即领取共享队列中的下一个任务,进度按完成顺序统计,最终报告仍按计划顺序输出。
|
||||
|
||||
## Release 查询与清理
|
||||
|
||||
双 release 运维由 Rust `bat` 通过 `bat.sock` 提供,不新增平行顶层 CLI:
|
||||
|
||||
```bash
|
||||
# 查看 official/localized 当前、历史、source relation 和完整性
|
||||
printf '{"jsonrpc":"2.0","id":1,"method":"release.status"}\n' \
|
||||
| socat - UNIX-CONNECT:/tmp/bat-state/bat.sock
|
||||
printf '{"jsonrpc":"2.0","id":2,"method":"release.list","params":{"channel":"localized"}}\n' \
|
||||
| socat - UNIX-CONNECT:/tmp/bat-state/bat.sock
|
||||
|
||||
# 选择已验证的 localized 当前 release,默认 channel 仍是 official
|
||||
printf '{"jsonrpc":"2.0","id":3,"method":"release.distribution","params":{"channel":"localized"}}\n' \
|
||||
| socat - UNIX-CONNECT:/tmp/bat-state/bat.sock
|
||||
```
|
||||
|
||||
`release.distribution` 只返回 Rust 已验证的当前或显式历史 release。localized 必须
|
||||
同时满足 source official、current、manifest identity、source/target hash/size 和
|
||||
UnityFS/ZIP 最终语义校验;staging、损坏、缺失或路径不安全的 release 不会跨 channel
|
||||
fallback。`localized.status` 的 `patch_manifest_contract_status` 与
|
||||
`artifact_integrity_status` 分开表示 schema 和产物健康度,产物损坏时为
|
||||
`localized.degraded`,检查不会自动修复。
|
||||
|
||||
清理必须先 dry-run,再使用同一 `plan_id` 执行:
|
||||
|
||||
```bash
|
||||
printf '{"jsonrpc":"2.0","id":4,"method":"release.cleanup","params":{"execute":false}}\n' \
|
||||
| socat - UNIX-CONNECT:/tmp/bat-state/bat.sock
|
||||
printf '{"jsonrpc":"2.0","id":5,"method":"release.cleanup","params":{"execute":true,"plan_id":"<plan-id>"}}\n' \
|
||||
| socat - UNIX-CONNECT:/tmp/bat-state/bat.sock
|
||||
```
|
||||
|
||||
Rust 会在执行前重算计划,保护 current、rollback previous、active/in-progress、
|
||||
localized source official、state/manifest/CAS/reference 和未知归属对象。cleanup 不改变
|
||||
current、不执行 rollback,也不删除 staging;回滚仍使用独立的 `localized.rollback`。
|
||||
|
||||
## 解析与重打包
|
||||
|
||||
解析当前已发布 release:
|
||||
|
||||
Reference in New Issue
Block a user