Skip to content
Snippets Groups Projects
Unverified Commit c94daa4f authored by Max Gautier's avatar Max Gautier
Browse files

download: Update yaml data with new hashes

parent 5be81553
No related branches found
No related tags found
No related merge requests found
......@@ -184,6 +184,10 @@ def download_hash(only_downloads: [str]) -> None:
],
strict=True))
components_supported_arch = {
component.removesuffix('_checksums'): [a for a in archs.keys()]
for component, archs in data.items()
}
new_versions = {
c:
{v for v in github_versions[c]
......@@ -216,6 +220,21 @@ def download_hash(only_downloads: [str]) -> None:
return (hash_file.content.decode().split()[0])
for component, versions in new_versions.items():
c = component + '_checksums'
for arch in components_supported_arch[component]:
for version in versions:
data[c][arch][str(version)] = f"{downloads[component].get('hashtype', 'sha256')}:{get_hash(component, version, arch)}"
data[c] = {arch :
{v :
versions[v] for v in sorted(versions.keys(),
key=Version,
reverse=True)
}
for arch, versions in data[c].items()
}
with open(CHECKSUMS_YML, "w") as checksums_yml:
yaml.dump(data, checksums_yml)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment