Make matching of build types easier

This commit is contained in:
Daniel Martí 2014-01-10 20:39:39 +01:00
parent 96885fc8c8
commit 0bd7711eeb
3 changed files with 26 additions and 17 deletions

View file

@ -466,6 +466,11 @@ def parse_metadata(metafile):
thisinfo['comments'].append((key, comment))
del curcomments[:]
def get_build_type(build):
for t in ['maven', 'gradle', 'kivy']:
if build.get(t, 'no') != 'no':
return t
return 'ant'
thisinfo = {}
if metafile:
@ -620,6 +625,9 @@ def parse_metadata(metafile):
if not thisinfo['Description']:
thisinfo['Description'].append('No description available')
for build in thisinfo['builds']:
build['type'] = get_build_type(build)
return thisinfo
# Write a metadata file.