mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
Recognise changes in subdirs in Tags and RepoManifest
This commit is contained in:
parent
00066a9b45
commit
eaf3216e40
2 changed files with 233 additions and 165 deletions
|
|
@ -533,6 +533,23 @@ def flagtype(name):
|
|||
return 'string'
|
||||
|
||||
|
||||
def fill_build_defaults(build):
|
||||
|
||||
def get_build_type():
|
||||
for t in ['maven', 'gradle', 'kivy']:
|
||||
if build[t]:
|
||||
return t
|
||||
if build['output']:
|
||||
return 'raw'
|
||||
return 'ant'
|
||||
|
||||
for flag, value in flag_defaults.iteritems():
|
||||
if flag in build:
|
||||
continue
|
||||
build[flag] = value
|
||||
build['type'] = get_build_type()
|
||||
|
||||
|
||||
# Parse metadata for a single application.
|
||||
#
|
||||
# 'metafile' - the filename to read. The package id for the application comes
|
||||
|
|
@ -628,14 +645,6 @@ def parse_metadata(metafile):
|
|||
thisinfo['comments'].append((key, comment))
|
||||
del curcomments[:]
|
||||
|
||||
def get_build_type(build):
|
||||
for t in ['maven', 'gradle', 'kivy']:
|
||||
if build[t]:
|
||||
return t
|
||||
if build['output']:
|
||||
return 'raw'
|
||||
return 'ant'
|
||||
|
||||
thisinfo = {}
|
||||
if metafile:
|
||||
if not isinstance(metafile, file):
|
||||
|
|
@ -767,11 +776,7 @@ def parse_metadata(metafile):
|
|||
thisinfo['Description'].append('No description available')
|
||||
|
||||
for build in thisinfo['builds']:
|
||||
for flag, value in flag_defaults.iteritems():
|
||||
if flag in build:
|
||||
continue
|
||||
build[flag] = value
|
||||
build['type'] = get_build_type(build)
|
||||
fill_build_defaults(build)
|
||||
|
||||
return thisinfo
|
||||
|
||||
|
|
@ -841,6 +846,10 @@ def write_metadata(dest, app):
|
|||
writefield('Repo')
|
||||
mf.write('\n')
|
||||
for build in app['builds']:
|
||||
|
||||
if build['version'] == "Ignore":
|
||||
continue
|
||||
|
||||
writecomments('build:' + build['vercode'])
|
||||
mf.write("Build:%s,%s\n" % (build['version'], build['vercode']))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue