mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-05-14 10:48:47 +02:00
Reworked the about page for a nicer version of the git hash (#283)
The git hash looks currently like this: `Build from GiT Revision: ('d3189f78c47d812f447739f97876ced01227e1fd',)` After this change it should look like this: `Build from GiT Revision: d3189f78c47d812f447739f97876ced01227e1fd`
This commit is contained in:
parent
fca53c5e0c
commit
6526549bdd
@ -25,6 +25,11 @@ def layout() -> list[html]:
|
||||
Returns:
|
||||
A list of html element making up this page.
|
||||
"""
|
||||
git_revision = os.getenv("GIT_HASH", "Running locally")
|
||||
for _ in "',()":
|
||||
git_revision = git_revision.replace(_, "")
|
||||
|
||||
git_revision = git_revision.strip()
|
||||
return [
|
||||
header_elements.create_selection_header("About"),
|
||||
html.H3("About Us"),
|
||||
@ -40,9 +45,7 @@ def layout() -> list[html]:
|
||||
html.Ul(
|
||||
[
|
||||
html.Li(f"Software Version: {__version__}"),
|
||||
html.Li(
|
||||
f"Build from GiT Revision: {os.getenv('GIT_HASH', 'Running locally'), }"
|
||||
),
|
||||
html.Li(f"Build from GiT Revision: {git_revision}"),
|
||||
]
|
||||
),
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user