From 7229443738482db2183d048cf8b8b8e6bd11fa6d Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 15 Jun 2022 23:43:03 -0400 Subject: [PATCH] docs: only list the latest build of a given stable tag for each wrapdb entry If we increment the build revision and re-release a wrap, it's a bugfix of an old version, so we can simply not bother to list it in the table. Just list the latest and greatest wrap for each tagged release. The rest are obviously still available if you look up the relevant tag manually on github, but they aren't very interesting to show here. --- tools/regenerate_docs.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/regenerate_docs.py b/tools/regenerate_docs.py index 25e6b5383..6e4d8f9ad 100755 --- a/tools/regenerate_docs.py +++ b/tools/regenerate_docs.py @@ -141,7 +141,13 @@ def generate_wrapdb_table(output_dir: Path) -> None: f.write('| Project | Versions | Provided dependencies | Provided programs |\n') f.write('| ------- | -------- | --------------------- | ----------------- |\n') for name, info in releases.items(): - versions = [f'[{v}](https://wrapdb.mesonbuild.com/v2/{name}_{v}/{name}.wrap)' for v in info['versions']] + versions = [] + added_tags = set() + for v in info['versions']: + tag, build = v.rsplit('-', 1) + if tag not in added_tags: + added_tags.add(tag) + versions.append(f'[{v}](https://wrapdb.mesonbuild.com/v2/{name}_{v}/{name}.wrap)') # Highlight latest version. versions_str = f'**{versions[0]}**
' + ', '.join(versions[1:]) dependency_names = info.get('dependency_names', [])