Skip to content

Commit

Permalink
Add editorconfig-checker (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvdb authored Apr 1, 2024
1 parent ee18540 commit ee2b189
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 3 deletions.
9 changes: 7 additions & 2 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}")")
Expand Down Expand Up @@ -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
Expand Down
58 changes: 58 additions & 0 deletions manifests/editorconfig-checker.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions tools/codegen/base/editorconfig-checker.json
Original file line number Diff line number Diff line change
@@ -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}"
}
}
}
2 changes: 1 addition & 1 deletion tools/codegen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ee2b189

Please sign in to comment.