diff --git a/README.md b/README.md index 31e80bb..b0ebcb9 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,8 @@ Until the first release tag exists, the root mirrors the preview build. To cut a release: -1. Bump `version` in `package.json` (and the `.app-version` badge in `index.html`). +1. Bump `version` in `package.json` — the only place it lives. The build injects + it into the in-app badge (`scripts/build.js`), and the E2E test derives it. 2. Commit and merge to `main`. 3. Tag the merge commit and push the tag: ```bash diff --git a/doc/arc42.md b/doc/arc42.md index 2dc389b..57f5487 100644 --- a/doc/arc42.md +++ b/doc/arc42.md @@ -300,7 +300,8 @@ flowchart TD ### Release process -1. Bump `version` in `package.json` and the `.app-version` badge in `index.html`. +1. Bump `version` in `package.json` (single source — the build injects it into + the badge and the E2E test derives it). 2. Merge to `main` (updates `/preview`). 3. `git tag vX.Y.Z && git push origin vX.Y.Z` → version-check gate → deploy to root. @@ -321,8 +322,11 @@ flowchart TD notifications; the singleton is reset in tests for order-independence. - **Validation.** Structural validator with no external deps; CI validates all `examples/*.ocf.json`. -- **Versioning.** Version lives in `package.json`, the in-app badge, and the - version test; the CI gate keeps a release tag consistent with `package.json`. +- **Versioning.** The version lives solely in `package.json`. `scripts/build.js` + injects it into the bundle at build time (esbuild `define` → `__APP_VERSION__`, + read from `$npm_package_version`), `main.js` writes it into the badge, and the + E2E test derives the expected value from `package.json`. The CI gate keeps a + release tag consistent with `package.json`. --- diff --git a/index.html b/index.html index d3c53dd..527126f 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@