update: do not replace Name/Summary from template unless blank

`fdroid nightly` needs this change so it can set the Summary using the
template.
This commit is contained in:
Hans-Christoph Steiner 2017-12-06 22:33:46 +01:00
parent 4afe5aefd5
commit 5d54446efc

View file

@ -1670,7 +1670,7 @@ def create_metadata_from_template(apk):
with open('template.yml') as f: with open('template.yml') as f:
metatxt = f.read() metatxt = f.read()
if 'name' in apk and apk['name'] != '': 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'], r'\1 ' + apk['name'],
metatxt, metatxt,
flags=re.IGNORECASE | re.MULTILINE) flags=re.IGNORECASE | re.MULTILINE)