mirror of
https://github.com/mitchellh/zig-overlay.git
synced 2025-02-05 17:02:48 +02:00
Get new tagged releases
This commit is contained in:
parent
9a32e40c79
commit
9c1e76fa14
2 changed files with 7 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
sources.old.json
|
sources.old.json
|
||||||
sources.new.json
|
sources.new.json
|
||||||
|
sources.new2.json
|
||||||
|
|
8
update
8
update
|
@ -4,7 +4,7 @@ set -e
|
||||||
|
|
||||||
# Build our new sources.json
|
# Build our new sources.json
|
||||||
curl -s 'https://ziglang.org/download/index.json' | jq '
|
curl -s 'https://ziglang.org/download/index.json' | jq '
|
||||||
["aarch64-linux", "x86_64-linux", "aarch64-macos", "x86_64-macos"] as $targets |
|
["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 todarwin(x): x | gsub("macos"; "darwin");
|
||||||
def toentry(vsn; x):
|
def toentry(vsn; x):
|
||||||
[(vsn as $version |
|
[(vsn as $version |
|
||||||
|
@ -31,6 +31,10 @@ to_entries[] | {
|
||||||
}
|
}
|
||||||
' > sources.new.json
|
' > sources.new.json
|
||||||
|
|
||||||
|
# Merge all of the objects from the previous step. Maybe there is a way
|
||||||
|
# to do this in one command (probably), but I don't know how!
|
||||||
|
jq -s add sources.new.json > sources.new2.json
|
||||||
|
|
||||||
# For debugging
|
# For debugging
|
||||||
# cat sources.new.json
|
# cat sources.new.json
|
||||||
# exit
|
# exit
|
||||||
|
@ -39,4 +43,4 @@ to_entries[] | {
|
||||||
cp sources.json sources.old.json
|
cp sources.json sources.old.json
|
||||||
|
|
||||||
# Recursive merge
|
# Recursive merge
|
||||||
jq -s '.[0] * .[1]' sources.old.json sources.new.json > sources.json
|
jq -s '.[0] * .[1]' sources.old.json sources.new2.json > sources.json
|
||||||
|
|
Loading…
Add table
Reference in a new issue