Prompt file imported from phc260/kokoro-kindle-reader (
.claude/commands/bump-version.md). Fill in{{arguments}},{{VERSION}}before use. Copyright stays with the author.
Bump the product version to {{arguments}} everywhere it is hard-coded, keeping all
locations in lockstep. This command only edits version strings — it does not build,
commit, tag, or push (those are deliberate, separate steps).
Steps
-
Validate the argument.
{{arguments}}must be a plain three-part semverX.Y.Z(digits only, e.g.0.4.0). If it is empty, malformed, or has avprefix, stop and explain the expected form — do not guess. -
Read the current version from
packaging/installer.nsi(the!define VERSIONline) so you can report the old → new transition and match the exact old strings. -
Edit these 13 locations (the version was previously confirmed to live in exactly these spots):
Three-part
version = "X.Y.Z"— the[package]version(line ~3) of every Rust crate in the repo (every crate shares one version number):kokoro-host/Cargo.tomlkokoro-panel/Cargo.tomlkokoro-sapi/Cargo.tomlkokoro-protocol/Cargo.tomlkokoro-hook/Cargo.tomlkokoro-inject/Cargo.tomlkokoro-sapi-smoke/Cargo.tomlkokoro-ocr/Cargo.toml
In
packaging/installer.nsi— both the three-part define and the four-part product version:!define VERSION "X.Y.Z"VIProductVersion "X.Y.Z.0"(Windows version resources are four-part; the.0is the unused revision field — keep it)
The browser extension, which ships its version to the browser's own UI:
kokoro-browser-extension/manifest.chrome.json("version")kokoro-browser-extension/manifest.firefox.json("version")kokoro-browser-extension/package.json("version")
Match each old string exactly so the edits are unambiguous.
-
Do NOT touch these — they pick the version up automatically:
kokoro-host/build.rs/kokoro-panel/build.rs— the exeFileVersion/ProductVersionare derived fromCARGO_PKG_VERSION(format!("{}.0", ...)), so the Cargo.toml bump flows through with no edit here.installer.nsi'sVIAddVersionKey "FileVersion" "{{VERSION}}"— derived from the define.- all
Cargo.lockfiles — theversionentries refresh on the nextcargo build. kokoro-browser-extension/dist/**and the staged copy — build output;build.tscopies the manifest through verbatim, so they update on the nextbun run build.ts.kokoro-browser-extension/manifest.*.json'skeyandbrowser_specific_settings.gecko.id— those are identity, not version. Changing them changes the extension id, andkokoro-host's HTTP endpoint allowlists that id as an origin, so every request would 403.
-
Verify. Grep the repo for both the old and new version and confirm: no stale occurrences of the old version remain outside
Cargo.lockandnative-deps/dep folders; and all 13 edited locations now show the new version. Report a short table of the files changed (old → new) and remind me that building the installer, committing, and tagging are separate steps I run when ready.
