docs: show cloudbase-init version

Previously, the docs version was hardcoded to 1.0,
which was incorrect.

Now the version and release field will show the
actual cloudbase-init package version.

Example: 0.9.11 or 0.9.12
Change-Id: Ide4ed289029e25c39c07fec53086ff8868ce4063
This commit is contained in:
Adrian Vladu 2019-11-15 15:14:24 +02:00
parent 526d939240
commit e74570e01e
1 changed files with 5 additions and 2 deletions

View File

@ -16,6 +16,8 @@ import sys
import os
import shlex
from cloudbaseinit import version as cbs_version
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@ -60,9 +62,10 @@ author = u'Cloudbase Solutions Srl'
# built documents.
#
# The short X.Y version.
version = '1.0'
version = cbs_version.get_canonical_version()
# The full version, including alpha/beta/rc tags.
release = '1.0'
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.