mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
Make matching of build types easier
This commit is contained in:
parent
96885fc8c8
commit
0bd7711eeb
3 changed files with 26 additions and 17 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue