Support yq (#2036)

Co-authored-by: Taiki Endo <te316e89@gmail.com>
This commit is contained in:
FirelightFlagboy
2026-11-02 04:54:42 +09:00
committed by GitHub
co-authored by Taiki Endo
parent eacbab5a1f
commit cb869a6319
4 changed files with 101 additions and 3 deletions
+1
View File
@@ -119,6 +119,7 @@ See the [Supported tools section in README.md](README.md#supported-tools) for ho
| [**wild**](https://github.com/wild-linker/wild) (alias: `wild-linker`) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/wild-linker/wild/releases) | Linux | [Apache-2.0](https://github.com/wild-linker/wild/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/wild-linker/wild/blob/main/LICENSE-MIT) | |
| [**xbuild**](https://github.com/rust-mobile/xbuild) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/rust-mobile/xbuild/releases) | Linux, macOS, Windows | [Apache-2.0 OR MIT](https://github.com/rust-mobile/xbuild/blob/v0.2.0/xbuild/Cargo.toml#L7) | |
| [**xh**](https://github.com/ducaale/xh) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/ducaale/xh/releases) | Linux, macOS, Windows | [MIT](https://github.com/ducaale/xh/blob/master/LICENSE) | |
| [**yq**](https://github.com/mikefarah/yq) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/mikefarah/yq/releases) | Linux, macOS, Windows | [MIT](https://github.com/mikefarah/yq/blob/master/LICENSE) | |
| [**zizmor**](https://github.com/zizmorcore/zizmor) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/zizmorcore/zizmor/releases) | Linux, macOS, Windows | [MIT](https://github.com/zizmorcore/zizmor/blob/main/LICENSE) | |
| [**zola**](https://github.com/getzola/zola) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/getzola/zola/releases) | Linux, macOS, Windows | [MIT](https://github.com/getzola/zola/blob/master/LICENSE) | |
+4 -3
View File
@@ -96,7 +96,7 @@ download_and_extract() {
# xbuild's binary name is "x", as opposed to the usual crate name
xbuild) installed_bin=("${bin_dir}/x${exe}") ;;
# Their binary names are renamed below.
editorconfig-checker | oxfmt) installed_bin=("${bin_dir}/${tool}${exe}") ;;
editorconfig-checker | oxfmt | yq) installed_bin=("${bin_dir}/${tool}${exe}") ;;
*)
for tmp in "${bin_in_archive[@]}"; do
installed_bin+=("${bin_dir}/$(basename -- "${tmp}")")
@@ -205,7 +205,7 @@ download_and_extract() {
esac
for tmp in "${bin_in_archive[@]}"; do
case "${tool}" in
editorconfig-checker | oxfmt) mv -- "${tmp}" "${bin_dir}/${tool}${exe}" ;;
editorconfig-checker | oxfmt | yq) mv -- "${tmp}" "${bin_dir}/${tool}${exe}" ;;
*) mv -- "${tmp}" "${bin_dir}/" ;;
esac
done
@@ -215,7 +215,7 @@ download_and_extract() {
unzip -q tmp
for tmp in "${bin_in_archive[@]}"; do
case "${tool}" in
editorconfig-checker | oxfmt) mv -- "${tmp}" "${bin_dir}/${tool}${exe}" ;;
editorconfig-checker | oxfmt | yq) mv -- "${tmp}" "${bin_dir}/${tool}${exe}" ;;
*) mv -- "${tmp}" "${bin_dir}/" ;;
esac
done
@@ -371,6 +371,7 @@ download_from_manifest() {
download_from_download_info "$@"
}
download_from_download_info() {
local tool="$1"
read_download_info "$@"
download_and_extract "${url}" "${checksum}" "${bin_dir}" "${bin_in_archive[@]}"
}
+64
View File
@@ -0,0 +1,64 @@
{
"rust_crate": null,
"template": {
"x86_64_linux_musl": {
"url": "https://github.com/mikefarah/yq/releases/download/v${version}/yq_linux_amd64.tar.gz",
"bin": "yq_linux_amd64"
},
"x86_64_macos": {
"url": "https://github.com/mikefarah/yq/releases/download/v${version}/yq_darwin_amd64.tar.gz",
"bin": "yq_darwin_amd64"
},
"x86_64_windows": {
"url": "https://github.com/mikefarah/yq/releases/download/v${version}/yq_windows_amd64.zip",
"bin": "yq_windows_amd64.exe"
},
"aarch64_linux_musl": {
"url": "https://github.com/mikefarah/yq/releases/download/v${version}/yq_linux_arm64.tar.gz",
"bin": "yq_linux_arm64"
},
"aarch64_macos": {
"url": "https://github.com/mikefarah/yq/releases/download/v${version}/yq_darwin_arm64.tar.gz",
"bin": "yq_darwin_arm64"
},
"aarch64_windows": {
"url": "https://github.com/mikefarah/yq/releases/download/v${version}/yq_windows_arm64.zip",
"bin": "yq_windows_arm64.exe"
}
},
"latest": {
"version": "4.54.1"
},
"4": {
"version": "4.54.1"
},
"4.54": {
"version": "4.54.1"
},
"4.54.1": {
"x86_64_linux_musl": {
"etag": "0x8DF1DE03114DF05",
"hash": "e68a456f90c577af3fe4960184b3a3cf5c461e0348407c10f107da3a5fec8972"
},
"x86_64_macos": {
"etag": "0x8DF1DE03109A104",
"hash": "b2cc367e9f5491b3b9b191aa19ba3a3163daf99d84f90bc7bd8918010a66e69a"
},
"x86_64_windows": {
"etag": "0x8DF1DE0310C362C",
"hash": "c2fb1234e58a3b80e358a0a8baeaf7ec51bfa698bbe40e2fcab0ed37d590c107"
},
"aarch64_linux_musl": {
"etag": "0x8DF1DE030F6F15A",
"hash": "8c27f6e7476fb5acefb9352e3d30f6bc2dc93f1956eb92e8da727173fb7ec6d3"
},
"aarch64_macos": {
"etag": "0x8DF1DE030FDEE5A",
"hash": "60d0c91aa8bf4030d38e80bb05f84c20be2e955f24d62b2e55d15ad643fa7afa"
},
"aarch64_windows": {
"etag": "0x8DF1DE030F0DDB6",
"hash": "2b2d1bc0db6d9801f6579aa2946871f1e6a598737a5ffcc6b043ea8c704e8991"
}
}
}
+32
View File
@@ -0,0 +1,32 @@
{
"repository": "https://github.com/mikefarah/yq",
"license_markdown": "[MIT](https://github.com/mikefarah/yq/blob/master/LICENSE)",
"tag_prefix": "v",
"version_range": ">= 4.54.1",
"platform": {
"x86_64_linux_musl": {
"asset_name": "yq_linux_amd64.tar.gz",
"bin": "yq_linux_amd64${exe}"
},
"x86_64_macos": {
"asset_name": "yq_darwin_amd64.tar.gz",
"bin": "yq_darwin_amd64${exe}"
},
"x86_64_windows": {
"asset_name": "yq_windows_amd64.zip",
"bin": "yq_windows_amd64${exe}"
},
"aarch64_linux_musl": {
"asset_name": "yq_linux_arm64.tar.gz",
"bin": "yq_linux_arm64${exe}"
},
"aarch64_macos": {
"asset_name": "yq_darwin_arm64.tar.gz",
"bin": "yq_darwin_arm64${exe}"
},
"aarch64_windows": {
"asset_name": "yq_windows_arm64.zip",
"bin": "yq_windows_arm64${exe}"
}
}
}