autoupdate.version_regex: allow multiple capture groups, splitted by '.'
This commit is contained in:
parent
37adbb13c0
commit
d507a25671
1 changed files with 2 additions and 1 deletions
|
@ -255,7 +255,8 @@ class AppAutoUpdater:
|
||||||
match = re.match(version_regex, tag)
|
match = re.match(version_regex, tag)
|
||||||
if match is None:
|
if match is None:
|
||||||
return None
|
return None
|
||||||
return match.group(1)
|
# Basically: either groupdict if named capture gorups, sorted by names, or groups()
|
||||||
|
return ".".join(dict(sorted(match.groupdict().items())).values() or match.groups())
|
||||||
|
|
||||||
def version_numbers(tag: str) -> Optional[tuple[int, ...]]:
|
def version_numbers(tag: str) -> Optional[tuple[int, ...]]:
|
||||||
filter_keywords = ["start", "rc", "beta", "alpha"]
|
filter_keywords = ["start", "rc", "beta", "alpha"]
|
||||||
|
|
Loading…
Reference in a new issue