1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

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 0d3bce7e14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -274,7 +274,7 @@ class AppAutoUpdater:
elif tag.startswith("release-"): elif tag.startswith("release-"):
t_to_check = tag.split("-", 1)[-1].replace("-", ".") 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) return AppAutoUpdater.tag_to_int_tuple(t_to_check)
print(f"Ignoring tag {t_to_check}, doesn't look like a version number") print(f"Ignoring tag {t_to_check}, doesn't look like a version number")
return None return None