From 616cfda2797438507a9558325b75fafc1f2ce93e Mon Sep 17 00:00:00 2001 From: Nicolas Hedger <649677+nhedger@users.noreply.github.com> Date: Fri, 6 Oct 2023 20:16:29 +0200 Subject: [PATCH] feat: add biome (#246) --- README.md | 1 + main.sh | 3 +- manifests/biome.json | 58 +++++++++++++++++++++++++++++++++++ tools/codegen/base/biome.json | 30 ++++++++++++++++++ 4 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 manifests/biome.json create mode 100644 tools/codegen/base/biome.json diff --git a/README.md b/README.md index 262c9fa2..dc1c667e 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ https://spdx.org/licenses | Name | Where binaries will be installed | Where will it be installed from | Supported platform | License | | ---- | -------------------------------- | ------------------------------- | ------------------ | ------- | +| [**biome**](https://biomejs.dev)| `/usr/local/bin` | [GitHub Releases](https://github.com/biomejs/biome/releases) | Linux, macOS, Windows | [MIT](https://github.com/biomejs/biome/blob/main/LICENSE) | [**cargo-binstall**][cargo-binstall] | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/cargo-bins/cargo-binstall/releases) | Linux, macOS, Windows | [GPL-3.0](https://github.com/cargo-bins/cargo-binstall/blob/HEAD/crates/bin/LICENSE) | | [**cargo-careful**](https://github.com/RalfJung/cargo-careful) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/RalfJung/cargo-careful/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/RalfJung/cargo-careful/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/RalfJung/cargo-careful/blob/HEAD/LICENSE-MIT) | | [**cargo-deny**](https://github.com/EmbarkStudios/cargo-deny) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/EmbarkStudios/cargo-deny/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/EmbarkStudios/cargo-deny/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/EmbarkStudios/cargo-deny/blob/HEAD/LICENSE-MIT) | diff --git a/main.sh b/main.sh index bc172035..88653bb4 100755 --- a/main.sh +++ b/main.sh @@ -667,7 +667,8 @@ for tool in "${tools[@]}"; do fi # cargo-udeps 0.1.30 and wasm-pack 0.12.0 do not support --version option. case "${tool}" in - cargo-careful | cargo-machete) ;; # cargo-careful 0.3.4 and cargo-machete 0.5.0 do not support neither --version nor --help option. + biome) rx "${tool_bin}" --version || true ;; # biome up to 1.2.2 exits with 1 on --version and --help + cargo-careful | cargo-machete) ;; # cargo-careful 0.3.4 and cargo-machete 0.5.0 do not support neither --version nor --help option. cargo-*) case "${tool}" in cargo-valgrind) rx "${tool_bin}" "${tool#cargo-}" --help ;; # cargo-valgrind 2.1.0's --version option just calls cargo's --version option diff --git a/manifests/biome.json b/manifests/biome.json new file mode 100644 index 00000000..320896ca --- /dev/null +++ b/manifests/biome.json @@ -0,0 +1,58 @@ +{ + "rust_crate": null, + "template": { + "x86_64_linux_gnu": { + "url": "https://github.com/biomejs/biome/releases/download/cli/v${version}/biome-linux-x64", + "bin": "biome" + }, + "x86_64_macos": { + "url": "https://github.com/biomejs/biome/releases/download/cli/v${version}/biome-darwin-x64", + "bin": "biome" + }, + "x86_64_windows": { + "url": "https://github.com/biomejs/biome/releases/download/cli/v${version}/biome-win32-x64.exe", + "bin": "biome.exe" + }, + "aarch64_linux_gnu": { + "url": "https://github.com/biomejs/biome/releases/download/cli/v${version}/biome-linux-arm64", + "bin": "biome" + }, + "aarch64_macos": { + "url": "https://github.com/biomejs/biome/releases/download/cli/v${version}/biome-darwin-arm64", + "bin": "biome" + }, + "aarch64_windows": { + "url": "https://github.com/biomejs/biome/releases/download/cli/v${version}/biome-win32-arm64.exe", + "bin": "biome.exe" + } + }, + "latest": { + "version": "1.2.2" + }, + "1": { + "version": "1.2.2" + }, + "1.2": { + "version": "1.2.2" + }, + "1.2.2": { + "x86_64_linux_gnu": { + "checksum": "4748cc070d114faa357a75cc18d99d3062b3468862ca6eb973fcfe4c07bf9d8b" + }, + "x86_64_macos": { + "checksum": "8f5f78b8c3c5e0dcff2531f6b847ff860b8d9c007f9f7564890f52a307284f7a" + }, + "x86_64_windows": { + "checksum": "b7fa90a8bfa76331f9764ea4e661c98819899e715ab5b45f34bced2a889f424d" + }, + "aarch64_linux_gnu": { + "checksum": "17f05345d1b6642da3ec88592612cf8af7ccbb09a011cee32d956dffe5fd920a" + }, + "aarch64_macos": { + "checksum": "04aee13d57fff780d0ff05a6817a1da20745a5e6827f3701a039a15a40620ca9" + }, + "aarch64_windows": { + "checksum": "fbf56fbfd9925d5350e543a532456f631c2f2b22ef04c8fb9154cf0721755039" + } + } +} diff --git a/tools/codegen/base/biome.json b/tools/codegen/base/biome.json new file mode 100644 index 00000000..9ef5782b --- /dev/null +++ b/tools/codegen/base/biome.json @@ -0,0 +1,30 @@ +{ + "repository": "https://github.com/biomejs/biome", + "tag_prefix": "cli/v", + "platform": { + "x86_64_linux_gnu": { + "bin": "${package}${exe}", + "asset_name": "${package}-linux-x64" + }, + "x86_64_macos": { + "bin": "${package}${exe}", + "asset_name": "${package}-darwin-x64" + }, + "x86_64_windows": { + "bin": "${package}${exe}", + "asset_name": "${package}-win32-x64.exe" + }, + "aarch64_linux_gnu": { + "bin": "${package}${exe}", + "asset_name": "${package}-linux-arm64" + }, + "aarch64_macos": { + "bin": "${package}${exe}", + "asset_name": "${package}-darwin-arm64" + }, + "aarch64_windows": { + "bin": "${package}${exe}", + "asset_name": "${package}-win32-arm64.exe" + } + } +}