doc/conf.py: fix version regular expression

Commit 44ef34db88 was broken.
This commit is contained in:
Max Kellermann 2022-11-03 20:32:52 +01:00
parent 619bb60b26
commit 1944c826bc

View File

@ -40,7 +40,8 @@ author = 'Max Kellermann'
# The short X.Y version.
with open('../meson.build') as f:
import re
version = re.match(r".*version:\s*'([^']+)'", f.readline()).group(1)
version = re.match(r"project\([^\)]*\bversion:\s*'([^']+)'",
f.read(4096)).group(1)
# The full version, including alpha/beta/rc tags.
#release = version + '~git'