Skip to content

Commit d088f4d

Browse files
committed
chore: sync Cargo.lock version in release.sh + catch up 0.13.0
release.sh was bumping Cargo.toml and pyproject.toml but never touching Cargo.lock, so every release left the committed lockfile one version behind (e.g. after v0.13.0, Cargo.lock still listed pg0 as 0.12.3). The release CI was rewriting it during build, but that contradicts the "commit Cargo.lock for reproducible builds" policy from 28c51ec. Add `cargo update -p pg0 --offline` to the release script between the Cargo.toml bump and the pyproject.toml bump. --offline keeps the operation hermetic (no network, no build.rs) and only touches the pg0 entry in the lockfile. Also stage Cargo.lock in the resulting commit. Also include the one-line Cargo.lock fix-up for 0.13.0 so main is no longer out of sync.
1 parent 8b98408 commit d088f4d

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,18 @@ release_cli() {
118118
sed -i.bak "s/^version = \".*\"/version = \"$version\"/" Cargo.toml
119119
rm -f Cargo.toml.bak
120120

121+
# Sync Cargo.lock so the committed lockfile matches Cargo.toml.
122+
# --offline avoids network and skips build.rs entirely.
123+
echo "Syncing Cargo.lock to $version..."
124+
cargo update -p pg0 --offline
125+
121126
# Update version in pyproject.toml
122127
echo "Updating pyproject.toml version to $version..."
123128
sed -i.bak "s/^version = \".*\"/version = \"$version\"/" sdk/python/pyproject.toml
124129
rm -f sdk/python/pyproject.toml.bak
125130

126131
# Commit and tag
127-
git add Cargo.toml sdk/python/pyproject.toml
132+
git add Cargo.toml Cargo.lock sdk/python/pyproject.toml
128133
git commit -m "chore: bump CLI version to $version"
129134
git tag -a "$tag" -m "Release $version"
130135

0 commit comments

Comments
 (0)