From 14a5596d0df2b15c7d8a5018d173d58572b46874 Mon Sep 17 00:00:00 2001 From: Sebastian Gode Date: Fri, 6 Sep 2024 08:12:07 +0000 Subject: [PATCH] Update tox.ini && conf.py file Performed-by: gitea/infra/otc-metadata/tools/generate_doc_confpy.py --- api-ref/source/conf.py | 8 ++++++++ doc/requirements.txt | 3 ++- doc/source/conf.py | 8 ++++++++ umn/source/conf.py | 8 ++++++++ zuul.yaml | 3 ++- 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index c08cdaf..4d19ffc 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -16,6 +16,8 @@ import os import sys +from git import Repo +from datetime import datetime extensions = [ 'otcdocstheme', @@ -115,3 +117,9 @@ latex_documents = [ u'Cloud Firewall - API Reference', u'OpenTelekomCloud', 'manual'), ] + +# 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/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 6dbcdb3..5eed927 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/umn/source/conf.py b/umn/source/conf.py index a722069..9e1204b 100644 --- a/umn/source/conf.py +++ b/umn/source/conf.py @@ -16,6 +16,8 @@ import os import sys +from git import Repo +from datetime import datetime extensions = [ 'otcdocstheme', @@ -115,3 +117,9 @@ latex_documents = [ u'Cloud Firewall - User Guide', u'OpenTelekomCloud', 'manual'), ] + +# 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