From: Hans-Christoph Steiner Date: Wed, 17 Jan 2018 14:21:59 +0000 (+0100) Subject: wiki: log update start/stop time and command line X-Git-Tag: 1.0.1~35^2~8 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=4beb2d52e90e2daa898b8f828a6e12fda3bcac1f;p=fdroidserver.git wiki: log update start/stop time and command line --- diff --git a/fdroidserver/update.py b/fdroidserver/update.py index b8a40095..5e37cab5 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -323,6 +323,18 @@ def update_wiki(apps, sortedids, apks): # Purge server cache to ensure counts are up to date site.Pages['Repository Maintenance'].purge() + # Write a page with the last build log for this version code + wiki_page_path = 'update_' + time.strftime('%s', start_timestamp) + newpage = site.Pages[wiki_page_path] + txt = '' + txt += "* command line: " + ' '.join(sys.argv) + "\n" + txt += "* started at " + common.get_wiki_timestamp(start_timestamp) + '\n' + txt += "* completed at " + common.get_wiki_timestamp() + '\n' + txt += "\n\n" + newpage.save(txt, summary='Run log') + newpage = site.Pages['update'] + newpage.save('#REDIRECT [[' + wiki_page_path + ']]', summary='Update redirect') + def delete_disabled_builds(apps, apkcache, repodirs): """Delete disabled build outputs. @@ -1759,6 +1771,7 @@ def create_metadata_from_template(apk): config = None options = None +start_timestamp = time.gmtime() def main():