From db2e270113a2298a4d99f987b98cb3a45dd117eb Mon Sep 17 00:00:00 2001 From: Sebastian Gode Date: Fri, 6 Sep 2024 08:17:37 +0000 Subject: [PATCH] Update tox.ini && conf.py file Performed-by: gitea/infra/otc-metadata/tools/generate_doc_confpy.py --- doc/requirements.txt | 3 ++- doc/source/conf.py | 8 ++++++++ zuul.yaml | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/requirements.txt b/doc/requirements.txt index 492834a..5723799 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -8,4 +8,5 @@ reno>=3.1.0 # Apache-2.0 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.git#egg=otc_metadata -setuptools \ No newline at end of file +setuptools +gitpython \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index e623044..8818f34 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -16,6 +16,8 @@ import os import sys +from git import Repo +from datetime import datetime extensions = [ 'otcdocstheme', @@ -111,3 +113,9 @@ html_copy_source = False # -- Options for PDF output -------------------------------------------------- latex_documents = [] + +# Get the Git commit values for last updated 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') \ No newline at end of file diff --git a/zuul.yaml b/zuul.yaml index a4d00bd..107ef29 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -1,3 +1,4 @@ +--- - project: merge-mode: squash-merge default-branch: main @@ -8,4 +9,4 @@ - noop gate: jobs: - - noop + - noop \ No newline at end of file