Extract current version from pyproject.toml.
()
| 15 | |
| 16 | |
| 17 | def get_current_version(): |
| 18 | """Extract current version from pyproject.toml.""" |
| 19 | pyproject_path = Path(__file__).parent.parent / "pyproject.toml" |
| 20 | content = pyproject_path.read_text() |
| 21 | match = re.search(r'version = "(\d+\.\d+\.\d+)"', content) |
| 22 | if not match: |
| 23 | raise ValueError("Could not find version in pyproject.toml") |
| 24 | return match.group(1) |
| 25 | |
| 26 | |
| 27 | def bump_version(current_version, bump_type): |