docs version uses VERSION file

This commit is contained in:
2026-08-30 23:39:07 -06:00
parent 3d91f3c235
commit c8e314b690

View File

@@ -45,14 +45,16 @@ master_doc = 'index'
project = u'ZoiteChat'
copyright = u'2026, TingPing'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '2.19'
# The full version, including alpha/beta/rc tags.
release = '2.19.0'
# Read the release directly from the repository's VERSION file so the
# documentation always matches the ZoiteChat source/release being built.
_version_file = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'VERSION')
)
with open(_version_file, encoding='utf-8') as version_file:
release = version_file.read().strip()
# The short X.Y version used by Sphinx.
version = '.'.join(release.split('.')[:2])
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.