1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-19 21:30:10 +01:00

checkupdates: skip when there is no match for version

... name regex in CheckUpdateData
This commit is contained in:
linsui 2023-03-07 13:21:34 +08:00 committed by Jochen Sprickerhof
parent 99be8d679d
commit 88eac942ec

View File

@ -159,6 +159,8 @@ def check_tags(app, pattern):
if codeex: if codeex:
m = re.search(codeex, filecontent) m = re.search(codeex, filecontent)
if not m: if not m:
logging.debug(f"UpdateCheckData regex {codeex} for version code"
f" has no match in tag {tag}")
continue continue
vercode = m.group(1).strip() vercode = m.group(1).strip()
@ -176,8 +178,12 @@ def check_tags(app, pattern):
version = tag version = tag
if verex: if verex:
m = re.search(verex, filecontent) m = re.search(verex, filecontent)
if m: if not m:
version = m.group(1) logging.debug(f"UpdateCheckData regex {verex} for version name"
f" has no match in tag {tag}")
continue
version = m.group(1)
logging.debug("UpdateCheckData found version {0} ({1})" logging.debug("UpdateCheckData found version {0} ({1})"
.format(version, vercode)) .format(version, vercode))