From 1aa8699e1548266365f7e5bc9b6355c1ffeda36e Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sat, 17 Jun 2023 07:24:11 -0700 Subject: [PATCH] Updated versionbump.py to include the new version in the error message and print the updated content when running in dry-run mode. --- scripts/versionbump.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/versionbump.py b/scripts/versionbump.py index 549a148b7..b3b6172cf 100644 --- a/scripts/versionbump.py +++ b/scripts/versionbump.py @@ -20,12 +20,13 @@ def main(): current_version = re.search(r'__version__ = "(.+?)"', content).group(1) if new_version <= version.parse(current_version): - raise ValueError("New version must be greater than the current version") + raise ValueError(f"New version {new_version} must be greater than the current version {current_version}") updated_content = re.sub(r'__version__ = ".+?"', f'__version__ = "{new_version}"', content) if dry_run: - print("Updating aider/__init__.py with new version") + print("Updating aider/__init__.py with new version:") + print(updated_content) else: with open("aider/__init__.py", "w") as f: f.write(updated_content)