diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-06-17 00:15:58 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2022-06-17 06:48:45 -0400 |
commit | 41860f686f7b3111676f651ea70a59674ca71e48 (patch) | |
tree | 25d4c2746739df225bfa39826dc82de308365f81 | |
parent | b87067dc8ba5ade1a36f353c89b43b018e8c0cc4 (diff) | |
download | meson-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.
-rwxr-xr-x | docs/genrelnotes.py | 2 |
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'): |