Skip to content

Commit 7289677

Browse files
committed
docs: use git version
Move the Sphinx configuration out of conf.py and pass it as command line arguments so that the version and release fields are derived from PATCHWORK_VERSION (which comes from git describe). Display the version in the docs title. Signed-off-by: Robin Jarry <robin@jarry.cc>
1 parent b950af8 commit 7289677

3 files changed

Lines changed: 12 additions & 25 deletions

File tree

‎Makefile‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,16 @@ docs:
5252
$(PYTHON) -m venv docs/.venv && \
5353
docs/.venv/bin/pip install -q -r docs/requirements.txt; \
5454
fi
55-
docs/.venv/bin/sphinx-build -b html docs docs/_build
55+
docs/.venv/bin/sphinx-build --builder html --isolated \
56+
-Dextensions=reno.sphinxext \
57+
-Dproject=Patchwork \
58+
-Dcopyright="The Patchwork Contributors" \
59+
-Dauthor="The Patchwork Contributors" \
60+
-Dversion="$(PATCHWORK_VERSION)" \
61+
-Drelease="$(PATCHWORK_VERSION)" \
62+
-Dexclude_patterns=_build,.venv \
63+
-Dhtml_theme=sphinx_rtd_theme \
64+
docs docs/_build
5665

5766
import_reviser ?= github.com/incu6us/goimports-reviser/v3@v3.12.6
5867
import_reviser_flags ?= -rm-unused -project-name github.com/getpatchwork/patchwork

‎docs/conf.py‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

‎docs/index.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
..
44
.. SPDX-License-Identifier: GPL-2.0-or-later
55
6-
Patchwork
7-
=========
6+
Patchwork -- |release|
7+
======================
88

99
.. toctree::
1010
:maxdepth: 2

0 commit comments

Comments
 (0)