chiark / gitweb /
build/checkupdates/update: log current fdroiddata commit to wiki
authorHans-Christoph Steiner <hans@eds.org>
Mon, 5 Mar 2018 20:47:19 +0000 (21:47 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 5 Mar 2018 20:49:09 +0000 (21:49 +0100)
fdroidserver/build.py
fdroidserver/checkupdates.py
fdroidserver/common.py
fdroidserver/update.py

index 58e4ccf42ba82eb400c48db1e98118669b6687d9..8f084a941b513f5c95d903bf02ba289c69f6cfa0 100644 (file)
@@ -1233,6 +1233,7 @@ def main():
                     txt = "* build session started at " + common.get_wiki_timestamp(start_timestamp) + '\n' \
                           + "* this build started at " + build_starttime + '\n' \
                           + "* this build completed at " + common.get_wiki_timestamp() + '\n' \
+                          + common.get_git_describe_link() \
                           + '* fdroidserverid: [https://gitlab.com/fdroid/fdroidserver/commit/' \
                           + fdroidserverid + ' ' + fdroidserverid + ']\n\n'
                     if buildserverid:
index 54b614ecc850c798c1c272aeffcf19a7dc8a5577..72c8b22b4fa3407542e9fc55404e3a0985ffe530 100644 (file)
@@ -535,6 +535,7 @@ def update_wiki(gplaylog, locallog):
             newpage = site.Pages[wiki_page_path]
             txt = ''
             txt += "* command line: <code>" + ' '.join(sys.argv) + "</code>\n"
+            txt += common.get_git_describe_link()
             txt += "* started at " + common.get_wiki_timestamp(start_timestamp) + '\n'
             txt += "* completed at " + common.get_wiki_timestamp() + '\n'
             txt += "\n\n"
index cf1d92035f9473f42b221ca6b9ad5e461c24149b..76089184708cb6a39618e9468981e73faec93041 100644 (file)
@@ -3100,3 +3100,21 @@ def get_android_tools_version_log(ndk_path=None):
         log += '* ' + name + ' (' + version + ')\n'
 
     return log
+
+
+def get_git_describe_link():
+    """Get a link to the current fdroiddata commit, to post to the wiki
+
+    """
+    try:
+        output = subprocess.check_output(['git', 'describe', '--always', '--dirty', '--abbrev=0'],
+                                         universal_newlines=True).strip()
+    except subprocess.CalledProcessError:
+        pass
+    if output:
+        commit = output.replace('-dirty', '')
+        return ('* fdroiddata: [https://gitlab.com/fdroid/fdroiddata/commit/{commit} {id}]\n'
+                .format(commit=commit, id=output))
+    else:
+        logging.error(_("'{path}' failed to execute!").format(path='git describe'))
+        return ''
index 90fc291b1de04dc579d9813519d36ea43ce36b61..c22ac0f32b70d6add7f64a2367a24ef0e6091761 100644 (file)
@@ -329,6 +329,7 @@ def update_wiki(apps, sortedids, apks):
     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 += common.get_git_describe_link()
     txt += "\n\n"
     txt += common.get_android_tools_version_log()
     newpage.save(txt, summary='Run log')