From 9647844060a7039834938435b3232dbd0e7d1d3d Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 14 Feb 2024 04:21:10 +0100 Subject: [PATCH] supports 1.13.1-2 version numbers --- tools/autoupdate_app_sources/autoupdate_app_sources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/autoupdate_app_sources/autoupdate_app_sources.py b/tools/autoupdate_app_sources/autoupdate_app_sources.py index 0facec40..3c0c58c6 100644 --- a/tools/autoupdate_app_sources/autoupdate_app_sources.py +++ b/tools/autoupdate_app_sources/autoupdate_app_sources.py @@ -101,7 +101,7 @@ def filter_and_get_latest_tag(tags, app_id): elif t.startswith("release-"): t_to_check = t.split("-", 1)[-1].replace("-", ".") - if not re.match(r"^v?[\d\.]*\d$", t_to_check): + if not re.match(r"^v?[\d\.]*\-?\d$", t_to_check): print(f"Ignoring tag {t_to_check}, doesn't look like a version number") else: tag_dict[t] = tag_to_int_tuple(t_to_check) @@ -112,7 +112,7 @@ def filter_and_get_latest_tag(tags, app_id): def tag_to_int_tuple(tag): - tag = tag.strip("v").strip(".") + tag = tag.strip("v").replace("-", ".").strip(".") int_tuple = tag.split(".") assert all(i.isdigit() for i in int_tuple), f"Cant convert {tag} to int tuple :/" return tuple(int(i) for i in int_tuple)