mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
feat: dynamically determine base version for history updates
This commit is contained in:
parent
8a598eacaf
commit
7dc4e00c75
1 changed files with 12 additions and 1 deletions
|
@ -3,10 +3,21 @@
|
|||
import os
|
||||
import subprocess
|
||||
import tempfile
|
||||
import re
|
||||
from aider import __version__
|
||||
|
||||
|
||||
def get_base_version():
|
||||
# Parse current version like "0.64.2.dev" to get major.minor
|
||||
match = re.match(r"(\d+\.\d+)", __version__)
|
||||
if not match:
|
||||
raise ValueError(f"Could not parse version: {__version__}")
|
||||
return match.group(1) + ".0"
|
||||
|
||||
|
||||
def run_git_log():
|
||||
cmd = ["git", "log", "-p", "v0.64.0..HEAD", "--", "aider/", ":!aider/website/", ":!HISTORY.md"]
|
||||
base_ver = get_base_version()
|
||||
cmd = ["git", "log", "-p", f"v{base_ver}..HEAD", "--", "aider/", ":!aider/website/", ":!HISTORY.md"]
|
||||
result = subprocess.run(cmd, capture_output=True, text=True)
|
||||
return result.stdout
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue