mirror of
https://github.com/YunoHost/yunodevtools.git
synced 2024-09-03 20:16:19 +02:00
Merge branch 'master' of https://github.com/YunoHost/apps
This commit is contained in:
commit
4faddec133
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
@ -300,7 +300,7 @@ class AppAutoUpdater:
|
|||
|
||||
@staticmethod
|
||||
def tag_to_int_tuple(tag: str) -> tuple[int, ...]:
|
||||
tag = tag.strip("v").replace("-", ".").strip(".")
|
||||
tag = tag.lstrip("v").replace("-", ".").rstrip(".")
|
||||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue