Sort versions by date then version for all products (#179)

This commit is contained in:
Marc Wrobel
2023-11-12 22:03:45 +01:00
parent e2de82c403
commit 600e77e212
35 changed files with 92 additions and 168 deletions

View File

@@ -5,17 +5,15 @@ PRODUCT = "typo3"
URL = "https://get.typo3.org/api/v1/release/"
print(f"::group::{PRODUCT}")
releases = {}
versions = {}
response = endoflife.fetch_url(URL)
data = json.loads(response)
for v in data:
if v['type'] != 'development':
date = v["date"][0:10]
releases[v["version"]] = date
versions[v["version"]] = date
print(f"{v['version']}: {date}")
endoflife.write_releases(PRODUCT, dict(sorted(
releases.items(), key=lambda x: list(map(int, x[0].split(".")))
)))
endoflife.write_releases(PRODUCT, versions)
print("::endgroup::")