mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 07:22:29 +03:00
Resolve some autoname problems
This commit is contained in:
parent
ed64737678
commit
6e904fba74
1 changed files with 21 additions and 14 deletions
|
@ -268,23 +268,30 @@ def main():
|
||||||
writeit = True
|
writeit = True
|
||||||
logmsg = "Update current version of " + app['id'] + " to " + version
|
logmsg = "Update current version of " + app['id'] + " to " + version
|
||||||
|
|
||||||
if app['Repo Type'] == 'srclib':
|
# Do the Auto Name thing...
|
||||||
app_dir = os.path.join('build', 'srclib', app['Repo'])
|
if len(app["Repo Type"]) > 0:
|
||||||
else:
|
|
||||||
app_dir = os.path.join('build/', app['id'])
|
|
||||||
|
|
||||||
vcs = common.getvcs(app["Repo Type"], app["Repo"], app_dir, sdk_path)
|
try:
|
||||||
vcs.gotorevision(None)
|
|
||||||
|
|
||||||
if len(app['builds']) > 0:
|
if app['Repo Type'] == 'srclib':
|
||||||
if 'subdir' in app['builds'][-1]:
|
app_dir = os.path.join('build', 'srclib', app['Repo'])
|
||||||
app_dir = os.path.join(app_dir, app['builds'][-1]['subdir'])
|
else:
|
||||||
|
app_dir = os.path.join('build/', app['id'])
|
||||||
|
|
||||||
new_name = common.fetch_real_name(app_dir)
|
vcs = common.getvcs(app["Repo Type"], app["Repo"], app_dir, sdk_path)
|
||||||
if new_name != app['Auto Name']:
|
vcs.gotorevision(None)
|
||||||
app['Auto Name'] = new_name
|
|
||||||
if not writeit:
|
if len(app['builds']) > 0:
|
||||||
writeit = True
|
if 'subdir' in app['builds'][-1]:
|
||||||
|
app_dir = os.path.join(app_dir, app['builds'][-1]['subdir'])
|
||||||
|
|
||||||
|
new_name = common.fetch_real_name(app_dir)
|
||||||
|
if new_name != app['Auto Name']:
|
||||||
|
app['Auto Name'] = new_name
|
||||||
|
if not writeit:
|
||||||
|
writeit = True
|
||||||
|
except Exception:
|
||||||
|
msg = "Auto Name failed for %s due to exception: %s" % (app['id'], traceback.format_exc())
|
||||||
|
|
||||||
if options.auto:
|
if options.auto:
|
||||||
mode = app['Auto Update Mode']
|
mode = app['Auto Update Mode']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue