mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 15:02:51 +03:00
parent
8533c9cb4b
commit
b86d815743
1 changed files with 6 additions and 5 deletions
|
@ -965,16 +965,17 @@ def write_yaml(mf, app):
|
|||
build = Build(build)
|
||||
b = ruamel.yaml.comments.CommentedMap()
|
||||
for field in build_flags:
|
||||
value = getattr(build, field)
|
||||
if hasattr(build, field) and value:
|
||||
if hasattr(build, field):
|
||||
value = getattr(build, field)
|
||||
if field == 'gradle' and value == ['off']:
|
||||
value = [ruamel.yaml.scalarstring.SingleQuotedScalarString('off')]
|
||||
if field in ('maven', 'buildozer'):
|
||||
if value == 'no':
|
||||
continue
|
||||
elif value == 'yes':
|
||||
value = 'yes'
|
||||
b.update({field: _field_to_yaml(flagtype(field), value)})
|
||||
typ = flagtype(field)
|
||||
# don't check value == True for TYPE_INT as it could be 0
|
||||
if value is not None and (typ == TYPE_INT or value):
|
||||
b.update({field: _field_to_yaml(typ, value)})
|
||||
builds.append(b)
|
||||
|
||||
# insert extra empty lines between build entries
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue