update pydir call and fix format

This commit is contained in:
ch3ll 2020-04-16 17:01:32 -04:00 committed by Daniel Wozniak
parent c87642181e
commit df480e37c0
4 changed files with 11 additions and 11 deletions

View file

@ -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 - https://docs.saltstack.com/en/master/topics/development/changelog.html
- [ ] Tests written/updated
### Commits signed with GPG?

View file

@ -5,11 +5,9 @@ This changelog follows [keepachangelog](https://keepachangelog.com/en/1.0.0/) fo
This project versioning is _similar_ to [Semantic Versioning](https://semver.org), and is documented in [SEP 14](https://github.com/saltstack/salt-enhancement-proposals/pull/20/files).
Versions are `MAJOR.PATCH`.
## 3001 - Sodium
## 3001 - Sodium [yyyy-mm-dd]
# Changelog
### 3000.1
## 3001 - Sodium [yyyy-mm-dd]
### Removed

View file

@ -6,7 +6,7 @@ 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
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>``
@ -40,9 +40,12 @@ The types are in alignment with keepachangelog:
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.
a summary of what you are fixing. If there is a legitimate reason to not include
an issue number with a given contribution you can add the PR number as the file
name (``<PR #>.<type>``).
This does require that an issue be linked to all of the types above.
If your PR does not align with any of the types, then you do not need to add a
changelog entry.
.. _generate-changelog:

View file

@ -1108,7 +1108,7 @@ def docs_html(session, compress):
if pydir == "py3.4":
session.error("Sphinx only runs on Python >= 3.5")
requirements_file = "requirements/static/docs.in"
distro_constraints = ["requirements/static/{}/docs.txt".format(_get_pydir(session))]
distro_constraints = ["requirements/static/{}/docs.txt".format(pydir)]
install_command = ["--progress-bar=off", "-r", requirements_file]
for distro_constraint in distro_constraints:
install_command.extend(["--constraint", distro_constraint])
@ -1132,7 +1132,7 @@ def docs_man(session, compress, update):
if pydir == "py3.4":
session.error("Sphinx only runs on Python >= 3.5")
requirements_file = "requirements/static/docs.in"
distro_constraints = ["requirements/static/{}/docs.txt".format(_get_pydir(session))]
distro_constraints = ["requirements/static/{}/docs.txt".format(pydir)]
install_command = ["--progress-bar=off", "-r", requirements_file]
for distro_constraint in distro_constraints:
install_command.extend(["--constraint", distro_constraint])
@ -1223,7 +1223,6 @@ def changelog(session, draft):
"""
Generate salt's changelog
"""
pydir = _get_pydir(session)
requirements_file = "requirements/static/changelog.in"
distro_constraints = [
"requirements/static/{}/changelog.txt".format(_get_pydir(session))
@ -1233,7 +1232,7 @@ def changelog(session, draft):
install_command.extend(["--constraint", distro_constraint])
session.install(*install_command, silent=PIP_INSTALL_SILENT)
town_cmd = ["towncrier", "--version={0}".format(session.posargs[0])]
town_cmd = ["towncrier", "--version={}".format(session.posargs[0])]
if draft:
town_cmd.append("--draft")
session.run(*town_cmd)