mirror of
https://github.com/mitchellh/zig-overlay.git
synced 2025-05-08 10:36:02 +03:00
remove the python script to verify hash since shasums are back
This commit is contained in:
parent
9c22776c96
commit
b6710eb74e
3 changed files with 8 additions and 99 deletions
22
update
22
update
|
@ -1,24 +1,21 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -p curl jq minisign python3Full -i sh
|
||||
#! nix-shell -p curl jq -i sh
|
||||
set -e
|
||||
|
||||
# Build our new sources.json
|
||||
curl -s 'https://ziglang.org/download/index.json' | jq '
|
||||
["aarch64-linux", "x86_64-linux", "aarch64-macos", "x86_64-macos", "aarch64-windows", "x86_64-windows"] as $targets |
|
||||
def todarwin(x): x | gsub("macos"; "darwin");
|
||||
def toentry(vsn; x; clobber_sha):
|
||||
def toentry(vsn; x):
|
||||
[(vsn as $version |
|
||||
.value |
|
||||
to_entries[] |
|
||||
select(.key as $key | any($targets[]; . == $key)) | {
|
||||
(todarwin(.key)): ({
|
||||
(todarwin(.key)): {
|
||||
"url": .value.tarball,
|
||||
"sha256": .value.shasum,
|
||||
"version": $version,
|
||||
} + (if (clobber_sha) then
|
||||
{ "sha256": .value.shasum }
|
||||
else
|
||||
{}
|
||||
end))
|
||||
}
|
||||
}
|
||||
)] | add | first(values, {});
|
||||
|
||||
|
@ -26,10 +23,10 @@ reduce to_entries[] as $entry ({}; . * (
|
|||
$entry | {
|
||||
(.key): (
|
||||
if (.key != "master") then
|
||||
toentry(.key; .value; false)
|
||||
toentry(.key; .value)
|
||||
else {
|
||||
"latest": toentry(.value.version; .value; true),
|
||||
(.value.date): toentry(.value.version; .value; true),
|
||||
"latest": toentry(.value.version; .value),
|
||||
(.value.date): toentry(.value.version; .value),
|
||||
} end
|
||||
)
|
||||
}
|
||||
|
@ -45,6 +42,3 @@ cp sources.json sources.old.json
|
|||
|
||||
# Recursive merge
|
||||
jq -s '.[0] * .[1]' sources.old.json sources.new.json > sources.json
|
||||
|
||||
# Verify new release signatures and compute the SHA-256 sum.
|
||||
python verify_and_hash.py
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue