feat: improve release information in footer. (#3738)

This commit is contained in:
Robert Sparks 2022-03-30 09:53:07 -05:00 committed by GitHub
parent 7917fa336a
commit 2e373adcd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 15 deletions

View file

@ -16,9 +16,3 @@ __release_branch__ = ''
# set this to ".p1", ".p2", etc. after patching
__patch__ = ""
__date__ = "$Date$"
__rev__ = "$Rev$ (dev) Latest release: Rev. 19974 "
__id__ = "$Id$"

View file

@ -3,7 +3,7 @@
import sys
import django
from django.conf import settings
from ietf import __date__, __rev__, __version__, __patch__, __id__
from ietf import __version__, __patch__, __release_branch__, __release_hash__
def server_mode(request):
return {'server_mode': settings.SERVER_MODE}
@ -17,11 +17,10 @@ def python_version():
def revision_info(request):
return {
'revision_time': __date__[7:32],
'revision_date': __date__[7:17],
'revision_num': __rev__[6:-2],
'revision_id': __id__[5:-2],
'version_num': __version__+__patch__,
'version_num': __version__,
'patch' : __patch__,
'branch' : __release_branch__,
'git_hash' : __release_hash__,
'django_version': django.get_version(),
'python_version': python_version(),
'bugreport_email': settings.BUG_REPORT_EMAIL,

View file

@ -120,8 +120,12 @@
{% if version_num %}
<a href="/release/about">About</a>
<a href="https://github.com/ietf-tools/datatracker/">IETF Datatracker</a>
<a href="/release/{{ version_num }}/">Version {{ version_num }}</a>
{{ revision_date }}
{% if server_mode and server_mode == "production" %}
<a href="https://github.com/ietf-tools/datatracker/releases/tag/{{version_num}}">Version {{ version_num }}{% if patch %}{{patch}}{% endif %}</a>
{% else %}
Version {{ version_num }}{% if patch %}{{patch}}{% endif %}
{% endif %}
{% if branch %}({{ branch }} - {{ git_hash|slice:":8" }}){% endif %}
{% endif %}
Report a bug:
<a href="https://github.com/ietf-tools/datatracker/issues/new/choose">