Fix checking current version since semantic versioning adoption (v7.0.0)
All checks were successful
Run tests / test-precommit (push) Successful in 1m2s

This commit is contained in:
Benjamin Renard 2024-04-25 23:34:56 +02:00
parent 50fa7c3bf5
commit 27a7385bed
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -64,7 +64,7 @@ EXCEPTION = None
try:
OUTPUT = subprocess.check_output(cmd) # nosec
logging.debug("Output:\n%s", OUTPUT)
m = re.search("version ([^ ]+) built", OUTPUT.decode("utf8", errors="ignore"))
m = re.search(r"version ([^ ]+)(\+gitea-| built)", OUTPUT.decode("utf8", errors="ignore"))
if m:
CURRENT = m.group(1)
except Exception as err: # pylint: disable=broad-except