diff options
author | Stephen Finucane <sfinucan@redhat.com> | 2017-10-09 20:58:00 +0100 |
---|---|---|
committer | Stephen Finucane <sfinucan@redhat.com> | 2017-10-10 09:36:59 +0100 |
commit | f450cd26a29e85573697cdd9fdc8279ef0fe8aed (patch) | |
tree | f69c5096e7a290910003fe838760b4d60dc75f0f | |
parent | c45687fb9b9fa541ceb47e5f9069c4628943ba2d (diff) | |
download | pbr-f450cd26a29e85573697cdd9fdc8279ef0fe8aed.tar.gz |
Add reno for release notes management
Change-Id: I36b8193b22123a409b729c7b9f4309507379f1ad
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | releasenotes/source/conf.py | 59 | ||||
-rw-r--r-- | releasenotes/source/index.rst | 8 | ||||
-rw-r--r-- | releasenotes/source/unreleased.rst | 5 | ||||
-rw-r--r-- | test-requirements.txt | 1 | ||||
-rwxr-xr-x | tools/tox_releasenotes.sh | 28 | ||||
-rw-r--r-- | tox.ini | 4 |
7 files changed, 109 insertions, 2 deletions
@@ -5,7 +5,10 @@ *.so # Sphinx -_build +doc/source/reference/api/ + +# Files created by releasenotes build +releasenotes/build # Packages/installer info *.egg @@ -29,7 +32,6 @@ develop-eggs cover AUTHORS ChangeLog -doc/source/reference/api/ # Editor files *~ diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py new file mode 100644 index 0000000..085c53e --- /dev/null +++ b/releasenotes/source/conf.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# 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. + +# pbr Release Notes documentation build configuration file + +import pbr.version + +# -- General configuration ------------------------------------------------ + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'openstackdocstheme', + 'reno.sphinxext', +] + +# The master toctree document. +master_doc = 'index' + +version_info = pbr.version.VersionInfo('pbr') + +# 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. +version = version_info.canonical_version_string() +# The full version, including alpha/beta/rc tags. +release = version_info.version_string_with_vcs() + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'openstackdocs' + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +html_last_updated_fmt = '%Y-%m-%d %H:%M' + + +# -- Options for openstackdocstheme --------------------------------------- + +repository_name = 'openstack-dev/pbr' +bug_project = 'pbr' +bug_tag = '' diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst new file mode 100644 index 0000000..e6e6346 --- /dev/null +++ b/releasenotes/source/index.rst @@ -0,0 +1,8 @@ +================= +pbr Release Notes +================= + +.. toctree:: + :maxdepth: 1 + + unreleased diff --git a/releasenotes/source/unreleased.rst b/releasenotes/source/unreleased.rst new file mode 100644 index 0000000..875030f --- /dev/null +++ b/releasenotes/source/unreleased.rst @@ -0,0 +1,5 @@ +============================ +Current Series Release Notes +============================ + +.. release-notes:: diff --git a/test-requirements.txt b/test-requirements.txt index b3ed859..12c8c55 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,6 +8,7 @@ mock>=2.0.0 # BSD python-subunit>=0.0.18 # Apache-2.0/BSD sphinx>=1.6.2 # BSD openstackdocstheme>=1.17.0 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 six>=1.9.0 # MIT testrepository>=0.0.18 # Apache-2.0/BSD testresources>=2.0.0 # Apache-2.0/BSD diff --git a/tools/tox_releasenotes.sh b/tools/tox_releasenotes.sh new file mode 100755 index 0000000..fc64b99 --- /dev/null +++ b/tools/tox_releasenotes.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +rm -rf releasenotes/build + +sphinx-build -a -E -W \ + -d releasenotes/build/doctrees \ + -b html \ + releasenotes/source releasenotes/build/html +BUILD_RESULT=$? + +UNCOMMITTED_NOTES=$(git status --porcelain | \ + awk '$1 ~ "M|A|??" && $2 ~ /releasenotes\/notes/ {print $2}') + +if [ "${UNCOMMITTED_NOTES}" ] +then + cat <<EOF + +REMINDER: The following changes to release notes have not been committed: + +${UNCOMMITTED_NOTES} + +While that may be intentional, keep in mind that release notes are built from +committed changes, not the working directory. + +EOF +fi + +exit ${BUILD_RESULT} @@ -4,6 +4,7 @@ envlist = py33,py34,py35,py27,pypy,pep8,docs [testenv] usedevelop = True +whitelist_externals = bash install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} passenv = PBR_INTEGRATION PIPFLAGS PIPVERSION PBRVERSION REPODIR WHEELHOUSE PROJECTS OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE setenv = @@ -22,6 +23,9 @@ commands = flake8 {posargs} [testenv:docs] commands = python setup.py build_sphinx +[testenv:releasenotes] +commands = bash -c {toxinidir}/tools/tox_releasenotes.sh + [testenv:cover] commands = python setup.py test --coverage |