1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-02 09:10:11 +02:00

wiki: log update start/stop time and command line

This commit is contained in:
Hans-Christoph Steiner 2018-01-17 15:21:59 +01:00
parent 5b92820ff3
commit 4beb2d52e9

View File

@ -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: <code>" + ' '.join(sys.argv) + "</code>\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():