1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-05 18:50:09 +02:00

Merge branch '530-lint-issue-with-disable' into 'master'

Resolve "Lint issues with 'disable: ...` in YAML"

Closes #530

See merge request fdroid/fdroidserver!550
This commit is contained in:
Hans-Christoph Steiner 2018-08-03 09:07:09 +00:00
commit a01d11ba64
3 changed files with 7 additions and 4 deletions

3
.gitignore vendored
View File

@ -16,6 +16,9 @@ pylint.parseable
/.testfiles/
README.rst
# editor tmp files
.*.swp
# files generated by tests
tmp/
/tests/repo/icons*

View File

@ -16,7 +16,7 @@ test:
metadata_v0:
image: registry.gitlab.com/fdroid/ci-images-server:latest
variables:
RELEASE_COMMIT_ID: b03c4a7353541b73b946e3aebb1585b0d20d2ccc # 1.1a~
RELEASE_COMMIT_ID: 1e7d9b854d7a036e59ed6c1f2993f13f41ff5852 # 1.1a~
script:
- git fetch https://gitlab.com/fdroid/fdroidserver $RELEASE_COMMIT_ID
- cd tests

View File

@ -249,7 +249,7 @@ class Build(dict):
def __init__(self, copydict=None):
super().__init__()
self.disable = False
self.disable = ''
self.commit = None
self.timeout = None
self.subdir = None
@ -874,7 +874,7 @@ def post_metadata_parse(app):
elif v == [False]:
return ['no']
_bool_allowed = ('disable', 'maven', 'buildozer')
_bool_allowed = ('maven', 'buildozer')
builds = []
if 'builds' in app:
@ -1118,7 +1118,7 @@ def write_yaml(mf, app):
value = getattr(build, field)
if field == 'gradle' and value == ['off']:
value = [ruamel.yaml.scalarstring.SingleQuotedScalarString('off')]
if field in ('disable', 'maven', 'buildozer'):
if field in ('maven', 'buildozer'):
if value == 'no':
continue
elif value == 'yes':