Skip to content

Commit c7d60d6

Browse files
pcarletonclaude
andauthored
fix: use --frozen instead of --locked in release workflow (#3140)
* fix: regenerate uv.lock after version bump in release script When the release script bumps the version in pyproject.toml, it needs to also regenerate the uv.lock file. Otherwise the lockfile becomes out of sync and `uv sync --locked` fails in CI with: "The lockfile at uv.lock needs to be updated" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: use --frozen instead of --locked in release workflow The release script bumps the version in pyproject.toml, which causes the lockfile to be out of sync (uv includes the package's own version in the lockfile). Using --frozen skips the lockfile freshness check while still using pinned dependency versions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent bd858d6 commit c7d60d6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132

133133
- name: Install dependencies
134134
working-directory: src/${{ matrix.package }}
135-
run: uv sync --locked --all-extras --dev
135+
run: uv sync --frozen --all-extras --dev
136136

137137
- name: Run pyright
138138
working-directory: src/${{ matrix.package }}

scripts/release.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ def update_version(self, version: Version):
9797
with open(self.path / "pyproject.toml", "w") as f:
9898
f.write(tomlkit.dumps(data))
9999

100+
# Regenerate uv.lock to match the updated pyproject.toml
101+
subprocess.run(["uv", "lock"], cwd=self.path, check=True)
102+
100103

101104
def has_changes(path: Path, git_hash: GitHash) -> bool:
102105
"""Check if any files changed between current state and git hash"""

0 commit comments

Comments
 (0)