Compare commits

...

2 Commits

Author SHA1 Message Date
6068d7cea1 Added Commit Hash and Time to confpy
Some checks failed
gl/check check status: failure (6068d7cea1a79a0cdad0b19e2e6b8fc16c2637bd)
2024-09-06 07:52:49 +00:00
1985e1f40d Added Commit Hash and Time to confpy
All checks were successful
gl/check check status: success (1985e1f40d5cdc790ed556777ca5e4f572550b72)
gl/gate gate status: success (1985e1f40d5cdc790ed556777ca5e4f572550b72)
2024-09-06 07:28:44 +00:00
2 changed files with 8 additions and 0 deletions

View File

@ -16,6 +16,8 @@
import os import os
import sys import sys
from git import Repo
from datetime import datetime
extensions = [ extensions = [
'otcdocstheme', 'otcdocstheme',
@ -132,3 +134,8 @@ latex_documents = [
{% endif -%} {% endif -%}
] ]
# Get the Git commit values for timestamp on each page
repo = Repo(search_parent_directories=True)
commit = repo.head.commit
current_commit_hash = commit.hexsha
current_commit_time = commit.committed_datetime.strftime('%Y-%m-%d %H:%M')

View File

@ -13,3 +13,4 @@ otc-sphinx-directives>=0.1.0
sphinx-minify>=0.0.1 # Apache-2.0 sphinx-minify>=0.0.1 # Apache-2.0
git+https://gitea.eco.tsi-dev.otc-service.com/infra/otc-metadata-swiss.git#egg=otc_metadata git+https://gitea.eco.tsi-dev.otc-service.com/infra/otc-metadata-swiss.git#egg=otc_metadata
setuptools setuptools
gitpython