mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Merge branch 'master' of gitorious.org:f-droid/fdroidserver
This commit is contained in:
commit
d00917d542
2 changed files with 16 additions and 10 deletions
|
|
@ -631,6 +631,7 @@ def main():
|
||||||
tmp_dir, repo_dir, vcs, options.test, options.server,
|
tmp_dir, repo_dir, vcs, options.test, options.server,
|
||||||
options.install, options.force, options.verbose):
|
options.install, options.force, options.verbose):
|
||||||
build_succeeded.append(app)
|
build_succeeded.append(app)
|
||||||
|
wikilog = "Build succeeded"
|
||||||
except BuildException as be:
|
except BuildException as be:
|
||||||
logfile = open(os.path.join(log_dir, app['id'] + '.log'), 'a+')
|
logfile = open(os.path.join(log_dir, app['id'] + '.log'), 'a+')
|
||||||
logfile.write(str(be))
|
logfile.write(str(be))
|
||||||
|
|
@ -639,25 +640,29 @@ def main():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
print "Could not build app %s due to BuildException: %s" % (app['id'], be)
|
print "Could not build app %s due to BuildException: %s" % (app['id'], be)
|
||||||
failed_apps[app['id']] = be
|
failed_apps[app['id']] = be
|
||||||
if options.wiki:
|
wikilog = str(be)
|
||||||
newpage = site.Pages[app['id'] + '/lastbuild']
|
|
||||||
txt = str(be)
|
|
||||||
if len(txt) > 8192:
|
|
||||||
txt = txt[-8192:]
|
|
||||||
try:
|
|
||||||
newpage.save(str(be), summary='Build log')
|
|
||||||
except:
|
|
||||||
print "Error while attempting to publish build log"
|
|
||||||
except VCSException as vcse:
|
except VCSException as vcse:
|
||||||
if options.stop:
|
if options.stop:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
print "VCS error while building app %s: %s" % (app['id'], vcse)
|
print "VCS error while building app %s: %s" % (app['id'], vcse)
|
||||||
failed_apps[app['id']] = vcse
|
failed_apps[app['id']] = vcse
|
||||||
|
wikilog = str(vcse)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if options.stop:
|
if options.stop:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
print "Could not build app %s due to unknown error: %s" % (app['id'], traceback.format_exc())
|
print "Could not build app %s due to unknown error: %s" % (app['id'], traceback.format_exc())
|
||||||
failed_apps[app['id']] = e
|
failed_apps[app['id']] = e
|
||||||
|
wikilog = str(e)
|
||||||
|
|
||||||
|
if options.wiki:
|
||||||
|
newpage = site.Pages[app['id'] + '/lastbuild']
|
||||||
|
txt = wikilog
|
||||||
|
if len(txt) > 8192:
|
||||||
|
txt = txt[-8192:]
|
||||||
|
try:
|
||||||
|
newpage.save(str(be), summary='Build log')
|
||||||
|
except:
|
||||||
|
print "Error while attempting to publish build log"
|
||||||
|
|
||||||
for app in build_succeeded:
|
for app in build_succeeded:
|
||||||
print "success: %s" % (app['id'])
|
print "success: %s" % (app['id'])
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,8 @@ def update_wiki(apps, apks, verbose=False):
|
||||||
print "Updating modified page " + page.name
|
print "Updating modified page " + page.name
|
||||||
page.save(generated_pages[page.name], summary='Auto-updated')
|
page.save(generated_pages[page.name], summary='Auto-updated')
|
||||||
else:
|
else:
|
||||||
print "Page " + page.name + " is unchanged"
|
if verbose:
|
||||||
|
print "Page " + page.name + " is unchanged"
|
||||||
else:
|
else:
|
||||||
print "Deleting page " + page.name
|
print "Deleting page " + page.name
|
||||||
page.delete('No longer published')
|
page.delete('No longer published')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue