diff --git a/doc/source/conf.py b/doc/source/conf.py index ec7cd57af9..9606533d2f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -25,7 +25,7 @@ import openstackdocstheme import os import pbr.version - +from subprocess import Popen, PIPE # 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. @@ -297,3 +297,7 @@ pdf_documents = [ (master_doc, target_name, title, author) ] + +pipe = Popen('git describe --abbrev=0 --tags', stdout=PIPE, shell=True) +version = pipe.stdout.read() +rst_epilog = '.. |my_conf_val| replace:: %s' % version diff --git a/doc/source/install-guide-revised-draft/deploymenthost.rst b/doc/source/install-guide-revised-draft/deploymenthost.rst index 00e30513ec..8f47285c0b 100644 --- a/doc/source/install-guide-revised-draft/deploymenthost.rst +++ b/doc/source/install-guide-revised-draft/deploymenthost.rst @@ -66,7 +66,7 @@ Install the source and dependencies for the deployment host. # git clone -b TAG https://github.com/openstack/openstack-ansible.git /opt/openstack-ansible - Replace ``TAG`` with the current stable release tag. + Replace ``TAG`` with the current stable release tag : |my_conf_val| #. Change to the ``/opt/openstack-ansible`` directory, and run the Ansible bootstrap script: