From b35d7bd0593b9167bf4251073b5653f99e3739e5 Mon Sep 17 00:00:00 2001 From: Tin Lam Date: Tue, 7 Feb 2017 09:59:49 -0600 Subject: [PATCH] Add version number to the documentation footer Currently, nova-dpm documentation does not have the version number in the footer. This patch set adds the version information to the ``doc/source/conf.py``. Closes-Bug: #1662519 Change-Id: I00de3cadda730fb78303579142d82d1ed10c01fa --- doc/source/conf.py | 7 +++++++ nova_dpm/version.py | 15 +++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 nova_dpm/version.py diff --git a/doc/source/conf.py b/doc/source/conf.py index 3bb93a8..da88c95 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -51,6 +51,13 @@ master_doc = 'index' project = u'nova-dpm' copyright = u'2016, OpenStack Foundation' +# Version information +import nova_dpm.version +# The short X.Y version. +version = nova_dpm.version.version_info.version_string() +# The full version, including alpha/beta/rc tags. +release = nova_dpm.version.version_info.release_string() + # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True diff --git a/nova_dpm/version.py b/nova_dpm/version.py new file mode 100644 index 0000000..d4f47f7 --- /dev/null +++ b/nova_dpm/version.py @@ -0,0 +1,15 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from pbr import version + +version_info = version.VersionInfo('nova-dpm')