Commit Graph

4 Commits

Author SHA1 Message Date
troytt c6f176f784 chore(scripts): configure commit author in publish-packs 2026-09-14 11:22:48 +00:00
troytt 1cdbe5de19 chore(scripts): update level count in publish-packs readme generator 2026-09-14 11:22:32 +00:00
troytt 9475886bc8 fix(scripts): 修复 publish-packs 统计地图关卡数量逻辑 2026-09-14 09:30:55 +00:00
troytt cd81a7e686 图库改走独立仓库 + 单提交历史(每次重烘 orphan + force push)
背景:Gitea 的 Release 附件在本实例不可用(1KB..59.5MB 全部 HTTP 500),所以图集包改为
发布到独立仓库 troytt/diablo2-web-assets,并刻意只保留一个提交——每次重烘在临时目录 git init
后提交当前包并 force push,仓库体积恒定在「一份快照」~66 MB;代码仓库 clone 保持 2.7 MB。

新增 scripts/publish-packs.ts(npm run publish:packs):
  - 统计块数/文件数/体积与 index.json sha256,生成图库仓库里的 README(用法、许可、重建步骤)
  - 写 .gitattributes(*.png binary -diff)
  - 在临时目录 init -b main → 拷贝 samples/d2-packs → 提交 → force push
  - 不落任何凭据到磁盘;remote 可用参数或 D2_ASSETS_REMOTE 覆盖

README「资源包从哪来」改为以图库仓库为主、归档镜像为辅;HANDOVER 记录两种发布方式、
服务端 gc 的注意事项(Gitea 的 cron.git_gc_repos 默认关闭,force push 后的旧对象需 gc 才回收)。
2026-09-14 12:03:27 +08:00