Run uv sync when bumping versions

This commit is contained in:
Yiorgis Gozadinos 2025-11-17 13:17:46 +02:00
parent da4179678b
commit 2f0811da28
No known key found for this signature in database

View file

@ -6,6 +6,7 @@ Updates version in all pyproject.toml files and CHANGELOG.md.
""" """
import re import re
import subprocess
import sys import sys
from datetime import date from datetime import date
from pathlib import Path from pathlib import Path
@ -123,6 +124,16 @@ def main():
# Update CHANGELOG.md # Update CHANGELOG.md
update_changelog(changelog_file, new_version) update_changelog(changelog_file, new_version)
# Run uv sync to update lock file
print()
print("Running uv sync...")
try:
subprocess.run(["uv", "sync"], check=True, cwd=root)
print("✓ Lock file updated")
except subprocess.CalledProcessError as e:
print(f"Error: uv sync failed with exit code {e.returncode}")
sys.exit(1)
print() print()
print(f"✓ Version bumped from {current_version} to {new_version}") print(f"✓ Version bumped from {current_version} to {new_version}")