1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

feat: smaller releases.json (#2343)

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2021-07-14 14:54:33 -03:00 committed by GitHub
parent 80dc5e65b7
commit a6e0a7f8a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,10 +21,11 @@ generate() {
done
if test "$last_page" -eq "1"; then
cp -f "$tmp/1.json" "$file"
jq --compact-output 'map({tag_name: .tag_name})' "$tmp"/1.json >"$file"
else
jq '[inputs] | add' "$tmp"/*.json >"$file"
jq --compact-output '[inputs] | add | map({tag_name: .tag_name})' "$tmp"/*.json >"$file"
fi
du -hs "$file"
}
generate "https://api.github.com/repos/goreleaser/goreleaser/releases" "www/docs/static/releases.json"