summaryrefslogtreecommitdiff
path: root/tools/ci/test_all_newsfragments_used.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2019-08-06 14:47:58 -0500
committerSebastian Berg <sebastian@sipsolutions.net>2019-09-15 08:30:07 -0700
commit958a6b5efd46758fb1874e2f80aba166d192fbf9 (patch)
tree3015a21c0d68d91229177dc099001c9d28eac2cc /tools/ci/test_all_newsfragments_used.py
parent31ffdecf07d18ed4dbb66b171cb0f998d4b190fa (diff)
downloadnumpy-958a6b5efd46758fb1874e2f80aba166d192fbf9.tar.gz
DOC,MAINT: Build release notes during CircleCI step
For the moment, this requires te use for the development version of towncrier.
Diffstat (limited to 'tools/ci/test_all_newsfragments_used.py')
-rwxr-xr-xtools/ci/test_all_newsfragments_used.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/ci/test_all_newsfragments_used.py b/tools/ci/test_all_newsfragments_used.py
new file mode 100755
index 000000000..6c4591fd8
--- /dev/null
+++ b/tools/ci/test_all_newsfragments_used.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+
+import sys
+import toml
+import os
+
+path = toml.load("pyproject.toml")["tool"]["towncrier"]["directory"]
+
+fragments = os.listdir(path)
+fragments.remove("README.rst")
+fragments.remove("template.rst")
+
+if fragments:
+ print("The following files were not found by towncrier:")
+ print(" " + " \n".join(fragments))
+ sys.exit(1)