Versioning
One version number, mirrored into three files, bumped by one command, published by one tag.
Single source of truth
| File | Holds | Written by |
|---|---|---|
VERSION | Plain text version — the source of truth | npm run bump |
manifest.json → version | What Chrome and the store read | npm run bump |
package.json → version | Tooling version | npm run bump |
CHANGELOG.md | Human-readable history | npm run bump (skeleton), then you |
Everyday commands
terminal
npm run bump patch # 1.8.0 -> 1.8.1 fixes
npm run bump minor # 1.8.0 -> 1.9.0 features
npm run bump major # 1.8.0 -> 2.0.0 breaking changes
npm run verify # all three version files must agree
npm run package # build dist/freerammer-v<version>.zip
npm run bump rewrites only the version value inside
manifest.json, so the store-generated formatting of the rest of the file stays
byte-identical and the diff is a single line.
Release flow
- Make the change on
main. - Bump the version and fill in the new changelog section.
- Commit, tag and push:
terminal
git add -A
git commit -m "chore(release): v$(cat VERSION)"
git tag -a "v$(cat VERSION)" -m "v$(cat VERSION)"
git push origin main --follow-tags
The Release workflow then verifies the version files, checks that the tag
matches VERSION, builds the zip and attaches it to a GitHub Release.
Guards
npm run verifyfails ifVERSION,manifest.jsonandpackage.jsondisagree.- On a clean, tagged commit it also fails if the tag does not match the version — that is what stops a mislabelled release.
- While you are mid-bump the working tree is dirty, so the tag check steps aside instead of blocking you.
Current version:
1.9.1 — tagged
v1.9.1, with the zip attached to the release.