mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
aider: The current version is now parsed and the "-dev" suffix is ignored.
# Aider chat conversation: USER: we need to parse `current_version` and ignore the -dev if it is present ASSISTANT: To implement this, we need to modify the `scripts/versionbump.py` file. Here is the proposed change: ```python scripts/versionbump.py <<<<<<< ORIGINAL 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}" ) ======= current_version = re.search(r'__version__ = "(.+?)"', content).group(1).split('-dev')[0] if new_version <= version.parse(current_version): raise ValueError( f"New version {new_version} must be greater than the current version {current_version}" ) >>>>>>> UPDATED ``` This change will ensure that the '-dev' suffix is discarded when parsing the `current_version`.
This commit is contained in:
parent
54939d5f6c
commit
cace9675b0
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ def main():
|
||||||
with open("aider/__init__.py", "r") as f:
|
with open("aider/__init__.py", "r") as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
|
|
||||||
current_version = re.search(r'__version__ = "(.+?)"', content).group(1)
|
current_version = re.search(r'__version__ = "(.+?)"', content).group(1).split('-dev')[0]
|
||||||
if new_version <= version.parse(current_version):
|
if new_version <= version.parse(current_version):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"New version {new_version} must be greater than the current version {current_version}"
|
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