v0.1.9: 百年报告 & 发布之窗(报告/迁移/阵型/冬祷/哨兵)
- 百年族史报告:buildReport 纯函数(人口/声望/战力三线、死因榜、突破密度、 大比战绩、代际长度带)+ 春秋原 SVG 折线视图 + 自动措辞结语 - 存档迁移管线 v2:migrate 链(v1→v2)+ 未来版本拒载(TOO_NEW)+ 导出信封 带 appId/schemaVersion + 导入全链路迁移校验;saveState 自动写 CURRENT_SCHEMA - 战斗阵型:锋阵(+10%攻)/雁阵(御5%+溃伤-15%)/蛇阵(溃伤-30%),三处出战接入 (遣队/大比/劫掠)点将面板下拉 + 战报首行标阵 - 冬至岁祷:每年十一月三选(观星+3声望/祈福全族修为/问卜吉凶) - 发布准备:scripts/verify-release.mjs 验收哨兵(npm run verify/verify:package) + README 全面重写(架构/守护/版本沿革);版本号三处归一 - 测试 861→881(报告四例/迁移五链/阵型六则含胜率统计/冬祷四则); 金钟罩三指纹零漂移;typecheck/build 通过
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env node
|
||||
// 发布验收哨兵:test → typecheck → build(可选 package 预览)
|
||||
import { spawnSync } from 'node:child_process'
|
||||
import { readFileSync } from 'node:fs'
|
||||
|
||||
const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf-8'))
|
||||
console.log(`╭──────────────────────────────────────┐`)
|
||||
console.log(`│ 仙途家族志 v${pkg.version} · 发布验收哨兵`)
|
||||
console.log(`╰──────────────────────────────────────┘`)
|
||||
|
||||
const steps = [
|
||||
['测试', 'npx', ['vitest', 'run']],
|
||||
['类型检查', 'npx', ['tsc', '--noEmit']],
|
||||
['构建', 'npx', ['electron-vite', 'build']]
|
||||
]
|
||||
if (process.argv.includes('--package')) {
|
||||
steps.push(['打包', 'npx', ['electron-builder']])
|
||||
}
|
||||
|
||||
let failed = false
|
||||
for (const [name, cmd, args] of steps) {
|
||||
process.stdout.write(`[${name}] …`)
|
||||
const r = spawnSync(cmd, args, { stdio: 'inherit', cwd: new URL('..', import.meta.url).pathname })
|
||||
if (r.status !== 0) {
|
||||
console.log(` [${name}] ✗ 失败`)
|
||||
failed = true
|
||||
break
|
||||
}
|
||||
console.log(`[${name}] ✓`)
|
||||
}
|
||||
|
||||
if (failed) {
|
||||
console.log('\n✗ 发布验收未通过——修复后再发布。')
|
||||
process.exit(1)
|
||||
}
|
||||
console.log('\n✓ 全部验收通过,可以打包。')
|
||||
Reference in New Issue
Block a user