summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-10-16 16:08:13 +0000
committerGerrit Code Review <review@openstack.org>2018-10-16 16:08:13 +0000
commitbd300d07ee016bf04b5da783fa696754b8a49af8 (patch)
tree50ca069275418e4a6367d5bd0599b1f849356ad9
parent73a763d1e3cb2f00c2dc4fbfecfab487f9698818 (diff)
parenta34629a956e614f60932e664801393cf1200438d (diff)
Merge "Add an option to skip generating RELEASENOTES.rst"HEADmaster
-rw-r--r--doc/source/user/packagers.rst17
-rw-r--r--doc/source/user/using.rst8
-rw-r--r--pbr/packaging.py7
3 files changed, 32 insertions, 0 deletions
diff --git a/doc/source/user/packagers.rst b/doc/source/user/packagers.rst
index 74af8ac..2e705b0 100644
--- a/doc/source/user/packagers.rst
+++ b/doc/source/user/packagers.rst
@@ -103,3 +103,20 @@ skipped. Similarly setting ``SKIP_WRITE_GIT_CHANGELOG``
103 103
104will cause logic around generating ``ChangeLog`` file using *git* 104will cause logic around generating ``ChangeLog`` file using *git*
105information to be skipped. 105information to be skipped.
106
107.. _packaging-releasenotes:
108
109Release Notes
110-------------
111
112*pbr* generates a release notes file, typically called ``RELEASENOTES.rst``,
113if `reno`_ is present and configured. You may wish to disable this
114functionality. If that is the case setting ``SKIP_GENERATE_RENO``
115
116::
117
118 export SKIP_GENERATE_RENO
119
120will disable this feature.
121
122.. _reno: https://docs.openstack.org/reno/latest/
diff --git a/doc/source/user/using.rst b/doc/source/user/using.rst
index 0104640..2e58fee 100644
--- a/doc/source/user/using.rst
+++ b/doc/source/user/using.rst
@@ -230,6 +230,13 @@ The ``pbr`` section controls *pbr*-specific options and behaviours.
230 This can also be configured using the ``SKIP_GENERATE_AUTHORS`` environment 230 This can also be configured using the ``SKIP_GENERATE_AUTHORS`` environment
231 variable, as described :ref:`here <packaging-authors-changelog>` 231 variable, as described :ref:`here <packaging-authors-changelog>`
232 232
233``skip_reno``
234 If enabled, *pbr* will not generate a ``RELEASENOTES.txt`` file if `reno`_ is
235 present and configured.
236
237 This can also be configured using the ``SKIP_GENERATE_RENO`` environment
238 variable, as described :ref:`here <packaging-releasenotes>`.
239
233``autodoc_tree_index_modules`` 240``autodoc_tree_index_modules``
234 A boolean option controlling whether *pbr* should generate an index of 241 A boolean option controlling whether *pbr* should generate an index of
235 modules using ``sphinx-apidoc``. By default, all files except ``setup.py`` 242 modules using ``sphinx-apidoc``. By default, all files except ``setup.py``
@@ -487,3 +494,4 @@ this file.
487 494
488.. _setuptools: http://www.sphinx-doc.org/en/stable/setuptools.html 495.. _setuptools: http://www.sphinx-doc.org/en/stable/setuptools.html
489.. _sphinxcontrib-apidoc: https://pypi.org/project/sphinxcontrib-apidoc/ 496.. _sphinxcontrib-apidoc: https://pypi.org/project/sphinxcontrib-apidoc/
497.. _reno: https://docs.openstack.org/reno/latest/
diff --git a/pbr/packaging.py b/pbr/packaging.py
index d8d3737..77a4b22 100644
--- a/pbr/packaging.py
+++ b/pbr/packaging.py
@@ -577,6 +577,13 @@ class LocalSDist(sdist.sdist):
577 if hasattr(self, '_has_reno'): 577 if hasattr(self, '_has_reno'):
578 return self._has_reno 578 return self._has_reno
579 579
580 option_dict = self.distribution.get_option_dict('pbr')
581 should_skip = options.get_boolean_option(option_dict, 'skip_reno',
582 'SKIP_GENERATE_RENO')
583 if should_skip:
584 self._has_reno = False
585 return False
586
580 try: 587 try:
581 # versions of reno witout this module will not have the required 588 # versions of reno witout this module will not have the required
582 # feature, hence the import 589 # feature, hence the import