checkupdates: find new subdirs for autonames too

The same method used for Tags and RepoManifest.
This commit is contained in:
Daniel Martí 2015-11-14 10:24:43 +01:00
parent b84688af7a
commit f604d845f5

View file

@ -334,25 +334,28 @@ def fetch_autoname(app, tag):
return None
if app['Repo Type'] == 'srclib':
app_dir = os.path.join('build', 'srclib', app['Repo'])
build_dir = os.path.join('build', 'srclib', app['Repo'])
else:
app_dir = os.path.join('build', app['id'])
build_dir = os.path.join('build', app['id'])
try:
vcs = common.getvcs(app["Repo Type"], app["Repo"], app_dir)
vcs = common.getvcs(app["Repo Type"], app["Repo"], build_dir)
vcs.gotorevision(tag)
except VCSException:
return None
flavours = []
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']:
flavours = app['builds'][-1]['gradle']
logging.debug("...fetch auto name from " + app_dir)
new_name = common.fetch_real_name(app_dir, flavours)
logging.debug("...fetch auto name from " + build_dir)
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
if new_name:
logging.debug("...got autoname '" + new_name + "'")