mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
parent
8533c9cb4b
commit
b86d815743
@ -965,16 +965,17 @@ def write_yaml(mf, app):
|
|||||||
build = Build(build)
|
build = Build(build)
|
||||||
b = ruamel.yaml.comments.CommentedMap()
|
b = ruamel.yaml.comments.CommentedMap()
|
||||||
for field in build_flags:
|
for field in build_flags:
|
||||||
|
if hasattr(build, field):
|
||||||
value = getattr(build, field)
|
value = getattr(build, field)
|
||||||
if hasattr(build, field) and value:
|
|
||||||
if field == 'gradle' and value == ['off']:
|
if field == 'gradle' and value == ['off']:
|
||||||
value = [ruamel.yaml.scalarstring.SingleQuotedScalarString('off')]
|
value = [ruamel.yaml.scalarstring.SingleQuotedScalarString('off')]
|
||||||
if field in ('maven', 'buildozer'):
|
if field in ('maven', 'buildozer'):
|
||||||
if value == 'no':
|
if value == 'no':
|
||||||
continue
|
continue
|
||||||
elif value == 'yes':
|
typ = flagtype(field)
|
||||||
value = 'yes'
|
# don't check value == True for TYPE_INT as it could be 0
|
||||||
b.update({field: _field_to_yaml(flagtype(field), value)})
|
if value is not None and (typ == TYPE_INT or value):
|
||||||
|
b.update({field: _field_to_yaml(typ, value)})
|
||||||
builds.append(b)
|
builds.append(b)
|
||||||
|
|
||||||
# insert extra empty lines between build entries
|
# insert extra empty lines between build entries
|
||||||
|
Loading…
Reference in New Issue
Block a user