mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-17 09:41:09 +02:00
docs: sphinx-build-wrapper: include localversion in kernel version string
Add any localversion* text to the kernel version string so that the docs index (home) page accurately indicates what the docs build version is. E.g.: 7.2.0-rc6-next-20260807 Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20260808045331.326769-1-rdunlap@infradead.org>
This commit is contained in:
committed by
Jonathan Corbet
parent
f323851805
commit
22a42ee5da
@@ -219,6 +219,15 @@ class SphinxBuilder:
|
||||
self.kernelrelease = os.environ.get("KERNELRELEASE", "unknown")
|
||||
self.pdflatex = os.environ.get("PDFLATEX", "xelatex")
|
||||
|
||||
#
|
||||
# Add localversion* to kernelversion if present
|
||||
#
|
||||
for file in glob(os.environ["srctree"] + "/localversion*"):
|
||||
if not file.endswith(".orig"):
|
||||
with open(file, 'r', encoding='utf-8') as f:
|
||||
text = f.read()
|
||||
self.kernelversion += text
|
||||
|
||||
#
|
||||
# Kernel main Makefile defines a PYTHON3 variable whose default is
|
||||
# "python3". When set to a different value, it allows running a
|
||||
|
||||
Reference in New Issue
Block a user