This commit is contained in:
Kovid Goyal 2020-03-15 13:36:09 +05:30
parent 90f41108d3
commit a49bd98ec6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -26,10 +26,12 @@ docs_dir = os.path.abspath('docs')
publish_dir = os.path.abspath(os.path.join('..', 'kovidgoyal.github.io', 'kitty'))
with open('kitty/constants.py') as f:
raw = f.read()
nv = re.search(r'^version\s+=\s+Version\((\d+), (\d+), (\d+)\)', raw, flags=re.MULTILINE)
nv = re.search(r'^version: Version\s+=\s+Version\((\d+), (\d+), (\d+)\)', raw, flags=re.MULTILINE)
if nv is not None:
version = '%s.%s.%s' % (nv.group(1), nv.group(2), nv.group(3))
appname = re.search(r"^appname: str\s+=\s+'([^']+)'", raw, flags=re.MULTILINE).group(1) # type: ignore
ap = re.search(r"^appname: str\s+=\s+'([^']+)'", raw, flags=re.MULTILINE)
if ap is not None:
appname = ap.group(1)
ALL_ACTIONS = 'man html build tag sdist upload website'.split()