[tor-commits] [depictor/master] Add the git versions. Closes #21101
tom at torproject.org
tom at torproject.org
Fri May 12 17:56:10 UTC 2017
commit 0621cd0c1d1c97835b6d8558e4fb0aa749821a37
Author: Tom Ritter <tom at ritter.vg>
Date: Fri May 12 12:55:59 2017 -0500
Add the git versions. Closes #21101
---
website.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/website.py b/website.py
index b9f81ff..31d526e 100755
--- a/website.py
+++ b/website.py
@@ -10,6 +10,7 @@ import os
import time
import operator
import datetime
+import subprocess
from base64 import b64decode
from Crypto.PublicKey import RSA
@@ -1409,10 +1410,19 @@ class WebsiteWriter:
Write the footer of the HTML page containing the blurb that is on
every page of the metrics website.
"""
- #XXX Write the git version and stem version the page was generated with
+ depictor_version = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'])
+
+ os.chdir(os.path.join(os.path.dirname(__file__), 'stem'))
+ stem_version = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD'])
+ os.chdir(os.path.join(os.path.dirname(__file__)))
+
self.site.write("</div>\n"
+ "</div>\n"
+ "<div class=\"bottom\" id=\"bottom\">\n"
+ + "<p>This page was generated with <a href=\""
+ + "https://gitweb.torproject.org/depictor.git/\">depictor</a> version "
+ + depictor_version + " and <a href=\"https://gitweb.torproject.org/stem.git/"
+ + "\">stem</a> version " + stem_version + "</p>"
+ "<p>\"Tor\" and the \"Onion Logo\" are <a "
+ "href=\"https://www.torproject.org/docs/trademark-faq.html.en\">"
+ "registered trademarks</a> of The Tor Project, Inc.</p>\n"
More information about the tor-commits
mailing list