mirror of
https://github.com/saltstack/salt.git
synced 2025-04-15 17:20:19 +00:00
Revert "add towncrier to manage changelog"
This reverts commit 57d160cc60
.
This commit is contained in:
parent
27ae826098
commit
2586f716b2
11 changed files with 2 additions and 205 deletions
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
@ -13,7 +13,7 @@ Remove this section if not relevant
|
|||
**[NOTICE] Bug fixes or features added to Salt require tests.**
|
||||
<!-- Please review the [test documentation](https://docs.saltstack.com/en/master/topics/tutorials/writing_tests.html) for details on how to implement tests into Salt's test suite. -->
|
||||
- [ ] Docs
|
||||
- [ ] Changelog - https://docs.saltstack.com/en/latest/topics/development/changelog.html
|
||||
- [ ] Changelog
|
||||
- [ ] Tests written/updated
|
||||
|
||||
### Commits signed with GPG?
|
||||
|
|
|
@ -67,15 +67,6 @@ repos:
|
|||
- --py-version=3.5
|
||||
- --platform=linux
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-changelog-requirements
|
||||
name: Changelog Py3.5 Requirements
|
||||
files: ^requirements/static/changelog\.in$
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.5
|
||||
- --platform=linux
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-linux-crypto-py3.5-requirements
|
||||
name: Linux Py3.5 Crypto Requirements
|
||||
|
@ -175,15 +166,6 @@ repos:
|
|||
- --py-version=3.6
|
||||
- --platform=linux
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-changelog-requirements
|
||||
name: Changelog Py3.6 Requirements
|
||||
files: ^requirements/static/changelog\.in$
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.6
|
||||
- --platform=linux
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-linux-crypto-py3.6-requirements
|
||||
name: Linux Py3.6 Crypto Requirements
|
||||
|
@ -283,15 +265,6 @@ repos:
|
|||
- --py-version=3.7
|
||||
- --platform=linux
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-changelog-requirements
|
||||
name: Changelog Py3.7 Requirements
|
||||
files: ^requirements/static/changelog\.in$
|
||||
args:
|
||||
- -v
|
||||
- --py-version=3.7
|
||||
- --platform=linux
|
||||
|
||||
- id: pip-tools-compile
|
||||
alias: compile-linux-crypto-py3.7-requirements
|
||||
name: Linux Py3.7 Crypto Requirements
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# Changelog
|
||||
All notable changes to Salt will be documented in this file.
|
||||
|
||||
This changelog follows [keepachangelog](https://keepachangelog.com/en/1.0.0/) format, and is intended for human consumption.
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Add towncrier tool to the Salt project to help manage CHANGELOG.md file.
|
|
@ -1,87 +0,0 @@
|
|||
.. _changelog:
|
||||
|
||||
=========
|
||||
Changelog
|
||||
=========
|
||||
|
||||
With the addition of `SEP 01`_ the `keepachangelog`_ format was introduced into
|
||||
our CHANGELOG.md file. The Salt project is using the `towncrier`_ tool to manage
|
||||
the Changelog.md file. The reason this tool was added to manage the changelog
|
||||
was because we were previously managing the file manually and it would cause
|
||||
many merge conflicts. This tool allows us to add changelog entries into separate
|
||||
files and before a release we simply need to run ``towncrier --version=<version>``
|
||||
for it to compile the changelog correctly.
|
||||
|
||||
|
||||
.. _add-changelog:
|
||||
|
||||
How do I add a changelog entry
|
||||
------------------------------
|
||||
|
||||
To add a changelog entry you will need to add a file in the `changelog` directory.
|
||||
The file name should follow the syntax ``<issue #>.<type>``.
|
||||
|
||||
The types are in alignment with keepachangelog:
|
||||
|
||||
removed:
|
||||
any features that have been removed
|
||||
|
||||
deprecated:
|
||||
any features that will soon be removed
|
||||
|
||||
changed:
|
||||
any changes in current existing features
|
||||
|
||||
fixed:
|
||||
any bug fixes
|
||||
|
||||
added:
|
||||
any new features added
|
||||
|
||||
For example if you are fixing a bug for issue number #1234 your filename would
|
||||
look like this: changelog/1234.fixed. The contents of the file should contain
|
||||
a summary of what you are fixing.
|
||||
|
||||
This does require that an issue be linked to all of the types above.
|
||||
|
||||
.. _generate-changelog:
|
||||
|
||||
How to generate the changelog
|
||||
-----------------------------
|
||||
|
||||
This step is only used when we need to generate the changelog right before releasing.
|
||||
You should NOT run towncrier on your PR, unless you are preparing the final PR
|
||||
to update the changelog before a release.
|
||||
|
||||
You can run the `towncrier` tool directly or you can use nox to help run the command
|
||||
and ensure towncrier is installed in a virtual environment. The instructions below
|
||||
will detail both approaches.
|
||||
|
||||
If you want to see what output towncrier will produce before generating the change log
|
||||
you can run towncrier in draft mode:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
towncrier --draft --version=3001
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
nox -e 'changelog(draft=True)' -- 3000.1
|
||||
|
||||
Version will need to be set to whichever version we are about to release. Once you are
|
||||
confident the draft output looks correct you can now generate the changelog by running:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
towncrier --version=3001
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
nox -e 'changelog(draft=False)' -- 3000.1
|
||||
|
||||
After this is run towncrier will automatically remove all the files in the changelog directory.
|
||||
|
||||
|
||||
.. _`SEP 01`: https://github.com/saltstack/salt-enhancement-proposals/pull/2
|
||||
.. _`keepachangelog`: https://keepachangelog.com/en/1.0.0/
|
||||
.. _`towncrier`: https://pypi.org/project/towncrier/
|
21
noxfile.py
21
noxfile.py
|
@ -1129,24 +1129,3 @@ def docs_man(session, compress, update):
|
|||
if compress:
|
||||
session.run("tar", "-cJvf", "man-archive.tar.xz", "_build/man", external=True)
|
||||
os.chdir("..")
|
||||
|
||||
|
||||
@nox.session(name="changelog", python="3")
|
||||
@nox.parametrize("draft", [False, True])
|
||||
def changelog(session, draft):
|
||||
"""
|
||||
Generate salt's changelog
|
||||
"""
|
||||
requirements_file = "requirements/static/changelog.in"
|
||||
distro_constraints = [
|
||||
"requirements/static/{}/changelog.txt".format(_get_pydir(session))
|
||||
]
|
||||
install_command = ["--progress-bar=off", "-r", requirements_file]
|
||||
for distro_constraint in distro_constraints:
|
||||
install_command.extend(["--constraint", distro_constraint])
|
||||
session.install(*install_command, silent=PIP_INSTALL_SILENT)
|
||||
|
||||
town_cmd = ["towncrier", "--version={}".format(session.posargs[0])]
|
||||
if draft:
|
||||
town_cmd.append("--draft")
|
||||
session.run(*town_cmd)
|
||||
|
|
|
@ -16,34 +16,3 @@ line_length = 88
|
|||
ensure_newline_before_comments=true
|
||||
skip="salt/ext,tests/kitchen,templates"
|
||||
|
||||
[tool.towncrier]
|
||||
package = "salt"
|
||||
package_dir = "salt"
|
||||
filename = "CHANGELOG.md"
|
||||
directory = "changelog/"
|
||||
start_string = "# Changelog\n"
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "removed"
|
||||
name = "Removed"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "deprecated"
|
||||
name = "Deprecated"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "changed"
|
||||
name = "Changed"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "fixed"
|
||||
name = "Fixed"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "added"
|
||||
name = "Added"
|
||||
showcontent = true
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
towncrier
|
|
@ -1,12 +0,0 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile -o requirements/static/py3.5/changelog.txt -v requirements/static/changelog.in
|
||||
#
|
||||
click==7.1.1 # via towncrier
|
||||
incremental==17.5.0 # via towncrier
|
||||
jinja2==2.11.2 # via towncrier
|
||||
markupsafe==1.1.1 # via jinja2
|
||||
toml==0.10.0 # via towncrier
|
||||
towncrier==19.2.0
|
|
@ -1,12 +0,0 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile -o requirements/static/py3.6/changelog.txt -v requirements/static/changelog.in
|
||||
#
|
||||
click==7.1.1 # via towncrier
|
||||
incremental==17.5.0 # via towncrier
|
||||
jinja2==2.11.2 # via towncrier
|
||||
markupsafe==1.1.1 # via jinja2
|
||||
toml==0.10.0 # via towncrier
|
||||
towncrier==19.2.0
|
|
@ -1,12 +0,0 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile -o requirements/static/py3.7/changelog.txt -v requirements/static/changelog.in
|
||||
#
|
||||
click==7.1.1 # via towncrier
|
||||
incremental==17.5.0 # via towncrier
|
||||
jinja2==2.11.2 # via towncrier
|
||||
markupsafe==1.1.1 # via jinja2
|
||||
toml==0.10.0 # via towncrier
|
||||
towncrier==19.2.0
|
Loading…
Add table
Reference in a new issue