Skip to content

Commit

Permalink
add version to deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
TAJD committed Feb 10, 2024
1 parent 618d72c commit 0dcd3de
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
4 changes: 1 addition & 3 deletions demos/Home.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
It is based on the [ORC model](https://orc.org/uploads/files/ORC-VPP-Documentation-2023.pdf).
The source code can be [found here](https://github.com/marinlauber/Python-VPP) and any and all contributions are welcome 😊.
If you have a question, feature request or perhaps a bug report then please open an issue here or [send me an email](mailto:[email protected]).
If you have a question, feature request or perhaps a bug report then please open an issue [here](https://github.com/marinlauber/Python-VPP) or [send me an email](mailto:[email protected]).
"""
)

Expand Down
16 changes: 13 additions & 3 deletions demos/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import streamlit as st
import streamlit.components.v1 as components
import subprocess

def get_git_hash():
try:
git_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip().decode('utf-8')
return git_hash
except subprocess.CalledProcessError:
return None


def header():
Expand All @@ -20,15 +28,17 @@ def header():


def footer():
footer = """
git_hash = get_git_hash()
footer = f"""
<div style="text-align: center; margin-top: 50px;">
<hr>
<p>Yacht VPP</p>
<p>Contact: <a href="mailto:[email protected]">[email protected]</a></p>
<p style="font-size: 12px; color: gray;">
This application is provided as is and without warranty. The source code is available on <a href="https://github.com/marinlauber/Python-VPP">GitHub</a>.
This application is provided as is and without warranty.
The source code is available on <a href="https://github.com/marinlauber/Python-VPP">GitHub</a>.
Please file bug reports as an <a href="https://github.com/marinlauber/Python-VPP/issues">issue here</a>.
</p>
<p style="font-size: 12px; color: gray;">Version {git_hash}</p>
</div>
"""

Expand Down

0 comments on commit 0dcd3de

Please sign in to comment.