diff --git a/doc/source/conf.py b/doc/source/conf.py index 62bfcc9..0eec75e 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -40,6 +40,17 @@ master_doc = 'index' project = u'ironic-staging-drivers' copyright = u'2016, Ironic Staging Drivers Developers ' +# 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. +from ironic_staging_drivers import version as isd_version +# The full version, including alpha/beta/rc tags. +release = isd_version.version_info.release_string() +# The short X.Y version. +version = isd_version.version_info.version_string() + # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True diff --git a/ironic_staging_drivers/version.py b/ironic_staging_drivers/version.py new file mode 100644 index 0000000..74cb5aa --- /dev/null +++ b/ironic_staging_drivers/version.py @@ -0,0 +1,18 @@ +# Copyright 2016 Red Hat, Inc. +# All Rights Reserved. +# +# 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. + +import pbr.version + +version_info = pbr.version.VersionInfo('ironic-staging-drivers')