From acb76553406fcf8931497cd883b45b88c87efdfd Mon Sep 17 00:00:00 2001 From: Ramon Bartl Date: Tue, 15 Sep 2026 09:13:51 +0200 Subject: [PATCH] Bump Cargo.lock with the rest of the version bump-version.sh writes the new version into pyproject.toml, tauri.conf.json, Cargo.toml and frontend/package.json. It does not touch Cargo.lock, which carries the crate's own version too. The committed lock said 2.8.3 while Cargo.toml said 2.9.1, so cargo rewrote it on the first build and left the tree dirty. That is noise on every checkout that builds, and noise of exactly the kind that teaches people to discard a file without reading it -- I did that twice during this review before looking at what it was. cargo update --offline -p kaisho-desktop updates that one entry: --offline so a version bump does not need the network, -p so no dependency moves as a side effect. The lock is brought to 2.9.1 in the same commit. --- desktop/src-tauri/Cargo.lock | 2 +- scripts/bump-version.sh | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/desktop/src-tauri/Cargo.lock b/desktop/src-tauri/Cargo.lock index 64d7bc5e..0e6515f2 100644 --- a/desktop/src-tauri/Cargo.lock +++ b/desktop/src-tauri/Cargo.lock @@ -1840,7 +1840,7 @@ dependencies = [ [[package]] name = "kaisho-desktop" -version = "2.8.3" +version = "2.9.1" dependencies = [ "ab_glyph", "embed_plist", diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index 8055ed43..453ac709 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -63,6 +63,15 @@ p.write_text(json.dumps(data, indent=2) + '\n') sed -i '' "s/^version = \".*\"/version = \"$VERSION\"/" \ "$ROOT/desktop/src-tauri/Cargo.toml" +# Cargo.lock carries the crate's own version too, and cargo +# rewrites it on the next build. Leaving it behind means the +# committed lock is a release or two stale and every build +# dirties the working tree -- which trains people to discard +# the change without reading it. --offline so a version bump +# does not need the network, and -p so nothing else moves. +(cd "$ROOT/desktop/src-tauri" \ + && cargo update --offline -p kaisho-desktop >/dev/null) + # frontend/package.json python3 -c " import json, pathlib @@ -72,4 +81,5 @@ data['version'] = '$VERSION' p.write_text(json.dumps(data, indent=2) + '\n') " -echo "Done: pyproject.toml, tauri.conf.json, Cargo.toml, frontend/package.json all at v$VERSION" +echo "Done: pyproject.toml, tauri.conf.json, Cargo.toml, \ +Cargo.lock, frontend/package.json all at v$VERSION"