From c63688e0319caaf4b9fc88233538dbca8ba506ba Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 14 Jul 2022 16:50:50 +0200 Subject: [PATCH] docs: epilog: add version dynamically and drop unused AUTHOR replacement now that the man pages are generated from sphinx, not rst2man, they got access to the conf.py and things like its rst_epilog variable. Use that to set the correct version in there dynamically Signed-off-by: Thomas Lamprecht --- docs/conf.py | 7 ++++--- docs/epilog.rst | 3 --- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0f057074..5c18208e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -69,9 +69,6 @@ source_suffix = '.rst' # The master toctree document. master_doc = 'index' -epilog_file = open('epilog.rst', 'r') -rst_epilog = epilog_file.read() - # General information about the project. project = 'Proxmox Backup' copyright = '2019-2021, Proxmox Server Solutions GmbH' @@ -88,6 +85,10 @@ version = vstr(os.getenv('DEB_VERSION_UPSTREAM')) # The full version, including alpha/beta/rc tags. release = vstr(os.getenv('DEB_VERSION')) +epilog_file = open('epilog.rst', 'r') +rst_epilog = epilog_file.read() +rst_epilog += f"\n.. |VERSION| replace:: {version}" + man_pages = [ # CLI ('proxmox-backup-client/man1', 'proxmox-backup-client', 'Command line tool for Backup and Restore', [author], 1), diff --git a/docs/epilog.rst b/docs/epilog.rst index ed6a8800..972e6887 100644 --- a/docs/epilog.rst +++ b/docs/epilog.rst @@ -3,8 +3,6 @@ We use this file to define external links and common replacement patterns. -.. |VERSION| replace:: 1.0 -.. |AUTHOR| replace:: Proxmox Support Team .. |WEBSITE| replace:: https://www.proxmox.com .. |DOWNLOADS| replace:: https://www.proxmox.com/downloads @@ -40,4 +38,3 @@ .. _ISO Week date: https://en.wikipedia.org/wiki/ISO_week_date .. _systemd.time manpage: https://manpages.debian.org/buster/systemd/systemd.time.7.en.html -