From 80abaab723fa24d7a4d3308b78e428642f95b6d9 Mon Sep 17 00:00:00 2001 From: Alex Rockwell Date: Thu, 29 Jan 2026 02:07:58 -0500 Subject: [PATCH] fix(scripts): Only update poetry version in release script The bump command was replacing ALL version strings in pyproject.toml, including typer version, python_version in mypy config, and minversion in pytest config. Now it only updates the [tool.poetry] version. Co-Authored-By: Claude Opus 4.5 --- scripts/release.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/release.py b/scripts/release.py index 3896fc5..44a3e01 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -137,10 +137,22 @@ def get_current_version() -> str: def bump_version(new_version: str) -> None: - """Bump the version in pyproject.toml.""" + """Bump the version in pyproject.toml. + + Only updates the [tool.poetry] version, not other version strings + like typer version or python_version. + """ pyproject = Path("pyproject.toml") content = pyproject.read_text() - new_content = re.sub(r'version = "[^"]+"', f'version = "{new_version}"', content) + + # Only replace the version in [tool.poetry] section + # Match: version = "x.y.z" that appears right after name = "emdx" + new_content = re.sub( + r'(\[tool\.poetry\]\nname = "emdx"\n)version = "[^"]+"', + f'\\1version = "{new_version}"', + content + ) + pyproject.write_text(new_content) print(f"Updated pyproject.toml to version {new_version}")