Add editorconfig-checker (#430)

This commit is contained in:
John Vandenberg
2024-04-01 08:01:27 +08:00
committed by GitHub
parent ee185407dc
commit ee2b189d46
4 changed files with 97 additions and 3 deletions

View File

@@ -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

58
manifests/editorconfig-checker.json generated Normal file
View File

@@ -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"
}
}
}

View File

@@ -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}"
}
}
}

View File

@@ -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 -- <PACKAGE> [VERSION_REQ]"
"USAGE: cargo run --release -p install-action-internal-codegen -- <PACKAGE> [VERSION_REQ]"
);
std::process::exit(1);
}