From a49bd98ec6288c5669726d4a2803283c2003aac3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 15 Mar 2020 13:36:09 +0530 Subject: [PATCH] ... --- publish.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/publish.py b/publish.py index 749bd2ed8..1afdd437a 100755 --- a/publish.py +++ b/publish.py @@ -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()