diff --git a/main.sh b/main.sh index 8b7404fb6..43ed61ac0 100755 --- a/main.sh +++ b/main.sh @@ -68,7 +68,9 @@ download_and_extract() { local tmp case "${tool}" in # xbuild's binary name is "x", as opposed to the usual crate name - xbuild) installed_bin=("${bin_dir}/x") ;; + xbuild) installed_bin=("${bin_dir}/x${exe}") ;; + # editorconfig-checker's binary name is renamed below + editorconfig-checker) installed_bin=("${bin_dir}/${tool}${exe}") ;; *) for tmp in "${bin_in_archive[@]}"; do installed_bin+=("${bin_dir}/$(basename "${tmp}")") @@ -129,7 +131,10 @@ download_and_extract() { tar_args+=("tmp") tar "${tar_args[@]}" for tmp in "${bin_in_archive[@]}"; do - mv "${tmp}" "${bin_dir}/" + case "${tool}" in + editorconfig-checker) mv "${tmp}" "${bin_dir}/${tool}${exe}" ;; + *) mv "${tmp}" "${bin_dir}/" ;; + esac done else case "${url}" in diff --git a/manifests/editorconfig-checker.json b/manifests/editorconfig-checker.json new file mode 100644 index 000000000..b6e2ff00f --- /dev/null +++ b/manifests/editorconfig-checker.json @@ -0,0 +1,58 @@ +{ + "rust_crate": null, + "template": { + "x86_64_linux_gnu": { + "url": "https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v${version}/ec-linux-amd64.tar.gz", + "bin": "bin/ec-linux-amd64" + }, + "x86_64_macos": { + "url": "https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v${version}/ec-darwin-amd64.tar.gz", + "bin": "bin/ec-darwin-amd64" + }, + "x86_64_windows": { + "url": "https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v${version}/ec-windows-amd64.exe.tar.gz", + "bin": "bin/ec-windows-amd64.exe" + }, + "aarch64_linux_gnu": { + "url": "https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v${version}/ec-linux-arm64.tar.gz", + "bin": "bin/ec-linux-arm64" + }, + "aarch64_macos": { + "url": "https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v${version}/ec-darwin-arm64.tar.gz", + "bin": "bin/ec-darwin-arm64" + }, + "aarch64_windows": { + "url": "https://github.com/editorconfig-checker/editorconfig-checker/releases/download/v${version}/ec-windows-arm64.exe.tar.gz", + "bin": "bin/ec-windows-arm64.exe" + } + }, + "latest": { + "version": "3.0.0" + }, + "3": { + "version": "3.0.0" + }, + "3.0": { + "version": "3.0.0" + }, + "3.0.0": { + "x86_64_linux_gnu": { + "checksum": "8e2f3c5fa4891542535185a4859c5f92832bc11821eb03a081bc6bd87af5a829" + }, + "x86_64_macos": { + "checksum": "d331806227c1a1ed96ddd34eceac51bd1cef0121f78bdb09d509771f6e5aec79" + }, + "x86_64_windows": { + "checksum": "ff171ef63361bbd783622ba778a83e6fe5d6615e8b9e9e9c2f2c177e89dba499" + }, + "aarch64_linux_gnu": { + "checksum": "edf1d12ba1e6ff70090f063e7937081b49ba6007cd02e45f8329bbf965ed609e" + }, + "aarch64_macos": { + "checksum": "35324d5914d147cb51859e49c48909cef22ae448fca407b9d39f95dcc77be109" + }, + "aarch64_windows": { + "checksum": "40b382a225a345e28f575010b637a372eb004ba3f1544341df0fbc265d183ff6" + } + } +} diff --git a/tools/codegen/base/editorconfig-checker.json b/tools/codegen/base/editorconfig-checker.json new file mode 100644 index 000000000..5c9941d8c --- /dev/null +++ b/tools/codegen/base/editorconfig-checker.json @@ -0,0 +1,31 @@ +{ + "repository": "https://github.com/editorconfig-checker/editorconfig-checker", + "tag_prefix": "v", + "version_range": ">= 3.0.0", + "platform": { + "x86_64_linux_gnu": { + "asset_name": "ec-linux-amd64.tar.gz", + "bin": "bin/ec-linux-amd64" + }, + "aarch64_linux_gnu": { + "asset_name": "ec-linux-arm64.tar.gz", + "bin": "bin/ec-linux-arm64" + }, + "x86_64_macos": { + "asset_name": "ec-darwin-amd64.tar.gz", + "bin": "bin/ec-darwin-amd64" + }, + "aarch64_macos": { + "asset_name": "ec-darwin-arm64.tar.gz", + "bin": "bin/ec-darwin-arm64" + }, + "x86_64_windows": { + "asset_name": "ec-windows-amd64${exe}.tar.gz", + "bin": "bin/ec-windows-amd64${exe}" + }, + "aarch64_windows": { + "asset_name": "ec-windows-arm64${exe}.tar.gz", + "bin": "bin/ec-windows-arm64${exe}" + } + } +} diff --git a/tools/codegen/src/main.rs b/tools/codegen/src/main.rs index bdf094776..8fb4dca86 100644 --- a/tools/codegen/src/main.rs +++ b/tools/codegen/src/main.rs @@ -26,7 +26,7 @@ fn main() -> Result<()> { let args: Vec<_> = env::args().skip(1).collect(); if args.is_empty() || args.iter().any(|arg| arg.starts_with('-')) { println!( - "USAGE: cargo run -p install-action-internal-codegen -r -- [VERSION_REQ]" + "USAGE: cargo run --release -p install-action-internal-codegen -- [VERSION_REQ]" ); std::process::exit(1); }