From 5eadb484de84ccb21ae99bfb1a9f4486ae6993bf Mon Sep 17 00:00:00 2001 From: ashrod98 Date: Thu, 23 Sep 2021 15:45:03 +0000 Subject: [PATCH] Add release notes command to tox Added command "tox -e newnote slug-goes-here" to create a new release note. Fixes error that occurs when reno is not installed globally. Also changed contributor documentation to include this new command. Change-Id: I4568163d63e389891e701a424720567d065f70b3 --- doc/source/contributor/adding_release_notes.rst | 12 +++--------- tox.ini | 6 ++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/source/contributor/adding_release_notes.rst b/doc/source/contributor/adding_release_notes.rst index fecd00a369..af675cf2d3 100644 --- a/doc/source/contributor/adding_release_notes.rst +++ b/doc/source/contributor/adding_release_notes.rst @@ -65,18 +65,12 @@ To create a release note for your change, use: $ reno new slug-goes-here -If reno is not installed globally on your system, you can use it from venv -of your manila's tox. Prior to running the above command, run: +If reno is not installed globally on your system, you can use a tox +environment in manila: .. code-block:: console - $ source .tox/py3/bin/activate - -Or directly as a one-liner, with: - -.. code-block:: console - - $ tox -e venv -- reno new slug-goes-here + $ tox -e newnote slug-goes-here .. note:: diff --git a/tox.ini b/tox.ini index 1385f24c9d..600f8f6496 100644 --- a/tox.ini +++ b/tox.ini @@ -31,6 +31,12 @@ commands = -b html releasenotes/source releasenotes/build/html allowlist_externals = rm +[testenv:newnote] +deps = +-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/doc/requirements.txt +commands = reno new {posargs} + [testenv:debug] commands = oslo_debug_helper {posargs}