mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
Bugfix versionbump
This commit is contained in:
parent
62344a39cc
commit
ece45c7dc2
1 changed files with 4 additions and 2 deletions
|
@ -19,12 +19,14 @@ 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}")
|
||||
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()
|
||||
|
||||
current_version = re.search(r'__version__ = "(.+?)"', content).group(1).split("-dev")[0]
|
||||
current_version = re.search(r'__version__ = "(.+?)"', content).group(1)
|
||||
if new_version <= version.parse(current_version):
|
||||
raise ValueError(
|
||||
f"New version {new_version} must be greater than the current version {current_version}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue