diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_common.py | 29 | ||||
-rwxr-xr-x | bin/reproducible_common.sh | 1 | ||||
-rw-r--r-- | bin/templates/default_page_footer.mustache | 16 |
3 files changed, 28 insertions, 18 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index 8738a501..c3ea23fd 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -143,6 +143,9 @@ tab = ' ' renderer = pystache.Renderer(); status_icon_link_template = renderer.load_template( TEMPLATE_PATH + '/status_icon_link') +default_page_footer_template = renderer.load_template( + TEMPLATE_PATH + '/default_page_footer') + html_header = Template("""<!DOCTYPE html> <html> @@ -165,23 +168,12 @@ else: JOB_FOOTER += JOB_NAME+'</a> which is configured via this ' JOB_FOOTER += '<a href="https://anonscm.debian.org/git/qa/jenkins.debian.net.git/">git repo</a>.' -html_footer = Template(""" - <hr id="footer_separator" /><p style="font-size:0.9em;"><div id="page_footer"> - %s - There is more information <a href="%s/userContent/about.html">about - jenkins.debian.net</a> and about - <a href="https://wiki.debian.org/ReproducibleBuilds"> reproducible builds - of Debian</a> available elsewhere. - <br /> Last update: $date. - Copyright 2014-2016 <a href="mailto:holger@layer-acht.org">Holger Levsen</a> - and <a href="https://jenkins.debian.net//userContent/thanks.html">many others</a>. - The code of <a href="https://anonscm.debian.org/git/qa/jenkins.debian.net.git/">jenkins.debian.net.git</a> is mostly - GPL-2 licensed. The weather icons are public domain and have been taken - from the <a href=http://tango.freedesktop.org/Tango_Icon_Library target=_blank> - Tango Icon Library</a>. - </p> - </div></body> -</html>""" % (JOB_FOOTER, JENKINS_URL)) +def create_default_page_footer(date): + return renderer.render(default_page_footer_template, { + 'date': date, + 'job_footer': JOB_FOOTER, + 'jenkins_url': JENKINS_URL, + }) html_head_page = Template((tab*2).join((""" <header class="head"> @@ -391,7 +383,8 @@ def write_html_page(title, body, destfile, suite=defaultsuite, arch=defaultarch, if style_note: html += html_foot_page_style_note.substitute() if not noendpage: - html += html_footer.substitute(date=now) + html += create_default_page_footer(now) + html += '</body>\n</html>' else: html += '</body>\n</html>' try: diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index 8b382c23..9a6b8656 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -367,6 +367,7 @@ write_page_intro() { fi } +# See the python equivelent of this function: reproducible_common.py's create_default_page_footer write_page_footer() { write_page "<hr id=\"footer_separator\" /><p style=\"font-size:0.9em;\"><div id=\"page_footer\">" if [ -n "$JOB_URL" ] ; then diff --git a/bin/templates/default_page_footer.mustache b/bin/templates/default_page_footer.mustache new file mode 100644 index 00000000..1a8c46c5 --- /dev/null +++ b/bin/templates/default_page_footer.mustache @@ -0,0 +1,16 @@ +<hr id="footer_separator" /> +<p style="font-size:0.9em;"> + <div id="page_footer"> + {{job_footer}} + There is more information + <a href="{{jenkins_url}}/userContent/about.html">about jenkins.debian.net</a> + and about <a href="https://wiki.debian.org/ReproducibleBuilds"> reproducible builds of Debian</a> + available elsewhere. + <br /> Last update: {{date}} + <br /> Copyright 2014-2016 <a href="mailto:holger@layer-acht.org">Holger Levsen</a> + and <a href="https://jenkins.debian.net//userContent/thanks.html">many others</a>. + The code of <a href="https://anonscm.debian.org/git/qa/jenkins.debian.net.git/">jenkins.debian.net.git</a> + is mostly GPL-2 licensed. The weather icons are public domain and have been taken from the + <a href=http://tango.freedesktop.org/Tango_Icon_Library target=_blank> Tango Icon Library</a>. + </div> +</p> |