Ship weekly scenarios with the weekly puzzle run; docs and skills
This commit is contained in:
parent
d8df1e37f6
commit
0ece48a79d
6 changed files with 42 additions and 20 deletions
|
|
@ -47,7 +47,9 @@ added, checks them with `scripts/weekly-puzzle.js --check`, and deploys it in th
|
|||
Players get no update banner (the version does not change). Every release build also copies all weekly files from
|
||||
`main`, so a release never drops a published week, and regenerates (in the build, deterministically) any week
|
||||
not over yet that the release's prices no longer fit. Weekly files are plain JSON the game fetches only when the
|
||||
Puzzles list opens and never trusts; the service worker serves them network-first. See `docs/ARCHITECTURE.md`.
|
||||
Puzzles list opens and never trusts; the service worker serves them network-first. The weekly scenario rides along in
|
||||
the same run: `scripts/weekly-scenario.js` writes `site/scenarios/weekly/<key>.json` (fetched when the Scenarios list
|
||||
opens), committed and deployed with the puzzle, never by a second workflow. See `docs/ARCHITECTURE.md`.
|
||||
|
||||
## Before you hand back a change that touches the build, deploy or loading
|
||||
|
||||
|
|
|
|||
|
|
@ -21,12 +21,16 @@ version for a weekly puzzle. To publish or fix one by hand: `node scripts/weekly
|
|||
`gh workflow run release.yml --ref <live tag> -f tag=<live tag> -f weekly=true`). A release includes every weekly
|
||||
file on `main` when it builds.
|
||||
|
||||
The weekly scenario (`site/scenarios/weekly/`, `scripts/weekly-scenario.js`) ships in the same run and the same way:
|
||||
`--key`, `--force` and `--check` work alike. Its `--check` replays each week not over yet with the reference plan in
|
||||
the file; a new par is just written, a week the reference no longer wins is regenerated with `rev` + 1.
|
||||
|
||||
**Prices change, weeks follow.** `--check` re-solves every week not over yet with the game it runs; a week whose
|
||||
budget no longer verifies is regenerated deterministically (the same puzzle with a new budget if that works, else a
|
||||
fresh one for the same key) with `rev` + 1, which resets players' stars for that week only. Past weeks are left alone
|
||||
unless the game rejects them. `release.yml` runs it before the tests on every deploy and fails only if a week cannot be
|
||||
regenerated. A change to prices, cables or cities fails `npm test` until you run `node scripts/weekly-puzzle.js --check`
|
||||
and commit the regenerated files with it.
|
||||
and commit the regenerated files with it (and `node scripts/weekly-scenario.js --check` for the scenarios).
|
||||
|
||||
## Only release when Frederic says so
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue