Added Commit Hash and Time to confpy
This commit is contained in:
parent
69f89e77c4
commit
1985e1f40d
@ -16,6 +16,8 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
from git import Repo
|
||||
from datetime import datetime
|
||||
|
||||
extensions = [
|
||||
'otcdocstheme',
|
||||
@ -132,3 +134,8 @@ latex_documents = [
|
||||
{% endif -%}
|
||||
]
|
||||
|
||||
# Get the Git commit values
|
||||
repo = Repo(search_parent_directories=True)
|
||||
commit = repo.head.commit
|
||||
current_commit_hash = commit.hexsha[:7]
|
||||
current_commit_time = commit.committed_datetime.strftime('%Y-%m-%d %H:%M')
|
||||
|
@ -13,3 +13,4 @@ otc-sphinx-directives>=0.1.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
|
||||
setuptools
|
||||
gitpython
|
||||
|
Loading…
x
Reference in New Issue
Block a user