[maven] Sort versions by date then version

This commit is contained in:
Marc Wrobel
2023-01-08 13:37:25 +01:00
committed by Nemo
parent 4264c5a44c
commit 569f3a402c
3 changed files with 56 additions and 53 deletions

View File

@@ -64,7 +64,10 @@ def update_releases(product_filter=None):
def write_file(product_name, releases):
with open("releases/%s.json" % product_name, "w") as f:
f.write(json.dumps(releases, indent=2))
f.write(json.dumps(dict(
# sort by date then version (desc)
sorted(releases.items(), key=lambda x: (x[1], x[0]), reverse=True)
), indent=2))