mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
Use semver to compare version tags in get_all_tags_since function
This commit is contained in:
parent
4065fc62e6
commit
83060b5276
1 changed files with 5 additions and 1 deletions
|
@ -118,7 +118,11 @@ def get_counts_for_file(start_tag, end_tag, authors, fname):
|
|||
|
||||
def get_all_tags_since(start_tag):
|
||||
all_tags = run(['git', 'tag', '--sort=v:refname']).strip().split('\n')
|
||||
filtered_tags = [tag for tag in all_tags if semver.Version.is_valid(tag[1:]) and tag >= start_tag]
|
||||
start_version = semver.Version.parse(start_tag[1:]) # Remove 'v' prefix
|
||||
filtered_tags = [
|
||||
tag for tag in all_tags
|
||||
if semver.Version.is_valid(tag[1:]) and semver.Version.parse(tag[1:]) >= start_version
|
||||
]
|
||||
return [tag for tag in filtered_tags if tag.endswith('.0')]
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue