diff --git a/aider/versioncheck.py b/aider/versioncheck.py index c16a0d4b6..f297c7695 100644 --- a/aider/versioncheck.py +++ b/aider/versioncheck.py @@ -13,6 +13,12 @@ def check_version(print_cmd): latest_version = data["info"]["version"] current_version = aider.__version__ + from aider.dump import dump + dump(current_version) + dump(packaging.version.parse(latest_version)) + dump(packaging.version.parse( + current_version + )) if packaging.version.parse(latest_version) <= packaging.version.parse( current_version ): diff --git a/scripts/versionbump.py b/scripts/versionbump.py index 86549077e..027e15658 100644 --- a/scripts/versionbump.py +++ b/scripts/versionbump.py @@ -19,6 +19,7 @@ def main(): raise ValueError(f"Invalid version format, must be x.y.z: {new_version_str}") new_version = version.parse(new_version_str) + incremented_version = version.Version(f"{new_version.major}.{new_version.minor}.{new_version.micro + 1}") with open("aider/__init__.py", "r") as f: content = f.read() @@ -51,7 +52,7 @@ def main(): subprocess.run(cmd, check=True) updated_dev_content = re.sub( - r'__version__ = ".+?"', f'__version__ = "{new_version}-dev"', content + r'__version__ = ".+?"', f'__version__ = "{incremented_version}-dev"', content ) print()