chiark / gitweb /
update: do not replace Name/Summary from template unless blank
authorHans-Christoph Steiner <hans@eds.org>
Wed, 6 Dec 2017 21:33:46 +0000 (22:33 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Thu, 7 Dec 2017 21:39:32 +0000 (22:39 +0100)
`fdroid nightly` needs this change so it can set the Summary using the
template.

fdroidserver/update.py

index 71c4e430d4edee755dcae42f10ed0f09a81e4a2c..097513bf40e2dbb1d7d5937131495557d355fbe3 100644 (file)
@@ -1670,7 +1670,7 @@ def create_metadata_from_template(apk):
         with open('template.yml') as f:
             metatxt = f.read()
         if 'name' in apk and apk['name'] != '':
-            metatxt = re.sub(r'^(((Auto)?Name|Summary):).*$',
+            metatxt = re.sub(r'''^(((Auto)?Name|Summary):)[ '"\.]*$''',
                              r'\1 ' + apk['name'],
                              metatxt,
                              flags=re.IGNORECASE | re.MULTILINE)