Don't use 'checksum' in the components names

This commit is contained in:
Max Gautier
2024-12-20 11:21:54 +01:00
parent 38dd224ffe
commit 08913c4aa0

View File

@@ -176,20 +176,20 @@ def download_hash(only_downloads: [str]) -> None:
except InvalidVersion: except InvalidVersion:
return None return None
github_versions = dict(zip([k + '_checksums' for k in downloads.keys()], github_versions = dict(zip(downloads.keys(),
[ [
{ {
v for r in repo["releases"]["nodes"] v for r in repo["releases"]["nodes"]
if not r["isPrerelease"] if not r["isPrerelease"]
and (v := valid_version(r["tagName"])) is not None and (v := valid_version(r["tagName"])) is not None
} }
for repo in response.json()["data"]["with_releases"] for repo in response.json()["data"]["with_releases"]
], ],
strict=True)) strict=True))
new_versions = { new_versions = {
component: c:
{v for v in github_versions[component] {v for v in github_versions[c]
if any(v > version and (v.major, v.minor) == (version.major, version.minor) if any(v > version and (v.major, v.minor) == (version.major, version.minor)
for version in [max(minors) for _, minors in groupby(cur_v, lambda v: (v.minor, v.major))]) for version in [max(minors) for _, minors in groupby(cur_v, lambda v: (v.minor, v.major))])
# only get: # only get:
@@ -198,7 +198,7 @@ def download_hash(only_downloads: [str]) -> None:
} }
- set(cur_v) - set(cur_v)
for component, archs in data.items() for component, archs in data.items()
if component in [k + '_checksums' for k in downloads.keys()] if (c := component.removesuffix('_checksums')) in downloads.keys()
# this is only to bound cur_v in the scope # this is only to bound cur_v in the scope
and (cur_v := sorted(Version(k) for k in next(archs.values().__iter__()).keys())) and (cur_v := sorted(Version(k) for k in next(archs.values().__iter__()).keys()))
} }