From 288a7870df4ddcfe9ff63f42d3601b921ebe37c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 17 Feb 2024 15:41:57 +0100 Subject: [PATCH] autoupdate.version_regex: allow multiple capture groups, splitted by '.' --- tools/autoupdate_app_sources/autoupdate_app_sources.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/autoupdate_app_sources/autoupdate_app_sources.py b/tools/autoupdate_app_sources/autoupdate_app_sources.py index 3b7fbf80..fdfd74a4 100755 --- a/tools/autoupdate_app_sources/autoupdate_app_sources.py +++ b/tools/autoupdate_app_sources/autoupdate_app_sources.py @@ -255,7 +255,8 @@ class AppAutoUpdater: match = re.match(version_regex, tag) if match is 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, ...]]: filter_keywords = ["start", "rc", "beta", "alpha"]