diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2022-05-09 10:42:04 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2022-05-09 10:42:56 -0400 |
commit | 9116c7eb52504bec77d26881d2c28e427dc52143 (patch) | |
tree | 6becb88401eb15bdff6fc924211894e6d9c277d1 /tools/finalize.py | |
parent | 8d12d6196c369c7cf0164a1202e968dd68a2cb6c (diff) | |
parent | e009a87b5578cb16099b697ba8395c8f6bdd70f3 (diff) | |
download | python-setuptools-git-debt/remove-easy-install.tar.gz |
Merge branch 'main' into debt/remove-easy-installdebt/remove-easy-install
Diffstat (limited to 'tools/finalize.py')
-rw-r--r-- | tools/finalize.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/finalize.py b/tools/finalize.py index 516a2fb5..5a4df5df 100644 --- a/tools/finalize.py +++ b/tools/finalize.py @@ -42,6 +42,7 @@ def update_changelog(): cmd = [ sys.executable, '-m', 'towncrier', + 'build', '--version', get_version(), '--yes', ] @@ -79,11 +80,18 @@ def check_changes(): """ allowed = 'deprecation', 'breaking', 'change', 'doc', 'misc' except_ = 'README.rst', '.gitignore' - assert all( - any(key in file.name for key in allowed) + news_fragments = ( + file for file in pathlib.Path('changelog.d').iterdir() if file.name not in except_ ) + unrecognized = [ + str(file) + for file in news_fragments + if not any(f".{key}" in file.suffixes for key in allowed) + ] + if unrecognized: + raise ValueError(f"Some news fragments have invalid names: {unrecognized}") if __name__ == '__main__': |