From: Ciaran Gultnieks Date: Thu, 17 Jul 2014 13:05:16 +0000 (+0100) Subject: Put lastbuild log on wiki by vercode (with redirect) X-Git-Tag: 0.2.1~10 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f5890646e67f2c59a99e820c32b5c8d984e88f08;p=fdroidserver.git Put lastbuild log on wiki by vercode (with redirect) --- diff --git a/fdroidserver/build.py b/fdroidserver/build.py index 9d7185b3..7bacd4c0 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -1067,9 +1067,14 @@ def main(): if options.wiki and wikilog: try: - newpage = site.Pages[app['id'] + '/lastbuild'] + # Write a page with the last build log for this version code + lastbuildpage = app['id'] + '/lastbuild_' + thisbuild['vercode'] + newpage = site.Pages[lastbuildpage] txt = "Build completed at " + time.strftime("%Y-%m-%d %H:%M:%SZ", time.gmtime()) + "\n\n" + wikilog newpage.save(txt, summary='Build log') + # Redirect from /lastbuild to the most recent build log + newpage = site.Pages[app['id'] + '/lastbuild'] + newpage.save('#REDIRECT [[' + lastbuildpage + ']]', summary='Update redirect') except: logging.error("Error while attempting to publish build log") diff --git a/fdroidserver/update.py b/fdroidserver/update.py index a1955e5b..6df7f1fa 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -144,7 +144,7 @@ def update_wiki(apps, apks): buildfails = True apklist.append({'versioncode': int(thisbuild['vercode']), 'version': thisbuild['version'], - 'buildproblem': "The build for this version appears to have failed. Check the [[{0}/lastbuild|build log]].".format(app['id']) + 'buildproblem': "The build for this version appears to have failed. Check the [[{0}/lastbuild_{1}|build log]].".format(app['id'], thisbuild['vercode']) }) if app['Current Version Code'] == '0': cantupdate = True