1
0
Fork 0

Merge pull request #2094 from YunoHost/tag_match_regex

Better handling of version format in relevant_versions()
This commit is contained in:
Alexandre Aubin 2024-03-06 18:50:41 +01:00 committed by GitHub
commit 2186eb6fcd

View file

@ -274,7 +274,7 @@ class AppAutoUpdater:
elif tag.startswith("release-"):
t_to_check = tag.split("-", 1)[-1].replace("-", ".")
if re.match(r"^v?[\d\.]*\-?\d$", t_to_check):
if re.match(r"^v?\d+(\.\d+)*(\-\d+)?$", t_to_check):
return AppAutoUpdater.tag_to_int_tuple(t_to_check)
print(f"Ignoring tag {t_to_check}, doesn't look like a version number")
return None