aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-06-17 00:15:58 -0400
committerXavier Claessens <xclaesse@gmail.com>2022-06-17 06:48:45 -0400
commit41860f686f7b3111676f651ea70a59674ca71e48 (patch)
tree25d4c2746739df225bfa39826dc82de308365f81 /docs
parentb87067dc8ba5ade1a36f353c89b43b018e8c0cc4 (diff)
downloadmeson-41860f686f7b3111676f651ea70a59674ca71e48.zip
meson-41860f686f7b3111676f651ea70a59674ca71e48.tar.gz
meson-41860f686f7b3111676f651ea70a59674ca71e48.tar.bz2
docs: ensure stable order of release notes
Merging snippets happens in arbitrary order -- whatever filesystem globbing results in. This didn't matter too much when we ran it once at release time and checked the resulting release notes into git. However, now that we generate a temporary version of the release notes for development versions, the order of the results will periodically change. Sort the files before processing them in order to guarantee that whatever order they are in, they stay that way. As a side effect, it's now technically possible to guarantee an ordering by judicious use of snippets naming.
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/genrelnotes.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/genrelnotes.py b/docs/genrelnotes.py
index 21a097f..0d9f60d 100755
--- a/docs/genrelnotes.py
+++ b/docs/genrelnotes.py
@@ -70,7 +70,7 @@ def generate(relnotes, to_version, source_dir, output_dir):
output.parent.mkdir(exist_ok=True, parents=True)
with output.open('w', encoding='utf-8') as ofile:
ofile.write(RELNOTE_TEMPLATE.format(title, to_version, title_suffix))
- for snippetfile in Path(source_dir, 'markdown/snippets').glob('*.md'):
+ for snippetfile in sorted(Path(source_dir, 'markdown/snippets').glob('*.md')):
snippet = snippetfile.read_text(encoding='utf-8')
ofile.write(snippet)
if not snippet.endswith('\n'):