mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
Fix version numbering in source autoupdating (remove leading v)
This commit is contained in:
parent
0b3f41b916
commit
7776f15cc9
1 changed files with 10 additions and 7 deletions
|
@ -250,13 +250,16 @@ class AppAutoUpdater:
|
|||
|
||||
def apply_version_regex(tag: str) -> Optional[str]:
|
||||
# First preprocessing according to the manifest version_regex…
|
||||
if not version_regex:
|
||||
return tag
|
||||
if version_regex:
|
||||
match = re.match(version_regex, tag)
|
||||
if match is None:
|
||||
return None
|
||||
# Basically: either groupdict if named capture gorups, sorted by names, or groups()
|
||||
return ".".join(dict(sorted(match.groupdict().items())).values() or match.groups())
|
||||
tag = ".".join(dict(sorted(match.groupdict().items())).values() or match.groups())
|
||||
|
||||
# Then remove leading v
|
||||
tag = tag.lstrip("v")
|
||||
return tag
|
||||
|
||||
def version_numbers(tag: str) -> Optional[tuple[int, ...]]:
|
||||
filter_keywords = ["start", "rc", "beta", "alpha"]
|
||||
|
|
Loading…
Add table
Reference in a new issue