MCPcopy Create free account
hub / github.com/OpenPipe/ART / update_version

Function update_version

scripts/bump_version.py:41–54  ·  view source on GitHub ↗

Update version in pyproject.toml.

(new_version)

Source from the content-addressed store, hash-verified

39
40
41def update_version(new_version):
42 """Update version in pyproject.toml."""
43 pyproject_path = Path(__file__).parent.parent / "pyproject.toml"
44 content = pyproject_path.read_text()
45
46 # Update version
47 new_content = re.sub(
48 r'version = "\d+\.\d+\.\d+"', f'version = "{new_version}"', content
49 )
50
51 pyproject_path.write_text(new_content)
52
53 # run uv sync
54 subprocess.run(["uv", "sync"])
55
56
57def main():

Callers 1

mainFunction · 0.85

Calls 1

runMethod · 0.80

Tested by

no test coverage detected