mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 15:30:28 +03:00
checkupdates: find new subdirs for autonames too
The same method used for Tags and RepoManifest.
This commit is contained in:
parent
b84688af7a
commit
f604d845f5
1 changed files with 10 additions and 7 deletions
|
|
@ -334,25 +334,28 @@ def fetch_autoname(app, tag):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if app['Repo Type'] == 'srclib':
|
if app['Repo Type'] == 'srclib':
|
||||||
app_dir = os.path.join('build', 'srclib', app['Repo'])
|
build_dir = os.path.join('build', 'srclib', app['Repo'])
|
||||||
else:
|
else:
|
||||||
app_dir = os.path.join('build', app['id'])
|
build_dir = os.path.join('build', app['id'])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
vcs = common.getvcs(app["Repo Type"], app["Repo"], app_dir)
|
vcs = common.getvcs(app["Repo Type"], app["Repo"], build_dir)
|
||||||
vcs.gotorevision(tag)
|
vcs.gotorevision(tag)
|
||||||
except VCSException:
|
except VCSException:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
flavours = []
|
flavours = []
|
||||||
if len(app['builds']) > 0:
|
if len(app['builds']) > 0:
|
||||||
if app['builds'][-1]['subdir']:
|
|
||||||
app_dir = os.path.join(app_dir, app['builds'][-1]['subdir'])
|
|
||||||
if app['builds'][-1]['gradle']:
|
if app['builds'][-1]['gradle']:
|
||||||
flavours = app['builds'][-1]['gradle']
|
flavours = app['builds'][-1]['gradle']
|
||||||
|
|
||||||
logging.debug("...fetch auto name from " + app_dir)
|
logging.debug("...fetch auto name from " + build_dir)
|
||||||
new_name = common.fetch_real_name(app_dir, flavours)
|
for subdir in possible_subdirs(app):
|
||||||
|
if subdir == '.':
|
||||||
|
root_dir = build_dir
|
||||||
|
else:
|
||||||
|
root_dir = os.path.join(build_dir, subdir)
|
||||||
|
new_name = common.fetch_real_name(root_dir, flavours)
|
||||||
commitmsg = None
|
commitmsg = None
|
||||||
if new_name:
|
if new_name:
|
||||||
logging.debug("...got autoname '" + new_name + "'")
|
logging.debug("...got autoname '" + new_name + "'")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue