Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
website
Commits
84f568a8
Commit
84f568a8
authored
Apr 07, 2017
by
Andreas Valder
Browse files
enhanced commit msg in footer
parent
7ef5e958
Changes
2
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
84f568a8
...
...
@@ -57,7 +57,8 @@ if config['DEBUG']:
# get git commit
import
subprocess
app
.
jinja_env
.
globals
[
'gitversion'
]
=
subprocess
.
check_output
([
'git'
,
"log"
,
"-g"
,
"-1"
,
"--pretty=%H # %h # %d # %s"
]).
decode
(
'UTF-8'
).
split
(
'#'
)
output
=
subprocess
.
check_output
([
'git'
,
"log"
,
"-g"
,
"-1"
,
"--pretty=%H # %h # %d # %s"
]).
decode
(
'UTF-8'
).
split
(
'#'
)
app
.
jinja_env
.
globals
[
'gitversion'
]
=
{
'hash'
:
output
[
1
],
'longhash'
:
output
[
0
],
'branch'
:
output
[
2
],
'msg'
:
output
[
3
]
}
if
not
config
.
get
(
'SECRET_KEY'
,
None
):
config
[
'SECRET_KEY'
]
=
os
.
urandom
(
24
)
...
...
templates/base.html
View file @
84f568a8
...
...
@@ -147,7 +147,7 @@
</li>
{% if ismod() or config.DEBUG %}
<li
class=
"pull-right"
>
<a
target=
"_blank"
href=
"https://git.fsmpi.rwth-aachen.de/videoagwebsite/videoagwebsite/commit/{{ gitversion
[0]
}}"
><span
title=
"{{ gitversion
[2]
}} {{ gitversion
[1]
}}: {{ gitversion
[3]
}}"
data-toggle=
"tooltip"
>
{{ gitversion
[1]
}}
</span></a>
<a
target=
"_blank"
href=
"https://git.fsmpi.rwth-aachen.de/videoagwebsite/videoagwebsite/commit/{{ gitversion
.longhash
}}"
><span
title=
"{{ gitversion
.branch
}} {{ gitversion
.hash
}}: {{ gitversion
.msg
}}"
data-toggle=
"tooltip"
>
{{ gitversion
.hash
}}
</span></a>
<span>
{{ gethostname() }}
</span>
</li>
{% endif %}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment