Skip to content

Commit

Permalink
feat: support buildpacks for the detection
Browse files Browse the repository at this point in the history
  • Loading branch information
tamada committed Jun 26, 2022
1 parent 29866db commit 87bc0dc
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
[![Coverage Status](https://coveralls.io/repos/github/tamada/btmeister/badge.svg?branch=main)](https://coveralls.io/github/tamada/btmeister?branch=main)
[![Rust Report Card](https://rust-reportcard.xuri.me/badge/github.com/tamada/btmeister)](https://rust-reportcard.xuri.me/report/github.com/tamada/btmeister)

[![Version](https://img.shields.io/badge/Version-v0.5.0-green)](https://github.com/tamada/btmeister/releases/tag/v0.5.0)
[![License](https://img.shields.io/badge/License-MIT-green)](https://github.com/tamada/btmeister/blob/main/LICENSE)
[![Docker](https://img.shields.io/badge/Docker-v0.5.0-green?logo=docker)](https://github.com/tamada/btmeister/pkgs/container/btmeister/)
[![Version](https://img.shields.io/badge/Version-v0.4.7-green)](https://github.com/tamada/btmeister/releases/tag/v0.4.7)
[![DOI](https://zenodo.org/badge/483071389.svg)](https://zenodo.org/badge/latestdoi/483071389)

[![Docker](https://img.shields.io/badge/Docker-v0.4.7-green?logo=docker)](https://github.com/tamada/btmeister/pkgs/container/btmeister/)
[![Homebrew](https://img.shields.io/badge/Homebrew-tamada/brew/btmeister-green?logo=homebrew)](https://github.com/tamada/homebrew-brew)

Detecting the build tools in use.
Expand All @@ -24,7 +25,7 @@ This tool finds the build files from the specified directories, and identifies t
## :runner: Usage

```sh
btmeister v0.5.0
btmeister v0.4.7
Haruaki TAMADA
A tool for detecting build tools in use of the projects

Expand Down
7 changes: 7 additions & 0 deletions defs/buildtools.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
],
"url": "https://buck.build/"
},
{
"name": "Buildpacks",
"build-files": [
"buildpack.toml"
],
"url": "https://buildpacks.io"
},
{
"name": "Cargo",
"build-files": ["Cargo.toml"],
Expand Down
2 changes: 2 additions & 0 deletions site/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ title: ":house: btmeister"

[![Version](https://img.shields.io/badge/Version-v0.5.0-green)](https://github.com/tamada/btmeister/releases/tag/v0.5.0)
[![License](https://img.shields.io/badge/License-MIT-green)](https://github.com/tamada/btmeister/blob/main/LICENSE)
[![DOI](https://zenodo.org/badge/483071389.svg)](https://zenodo.org/badge/latestdoi/483071389)

[![Docker](https://img.shields.io/badge/Docker-v0.5.0-green?logo=docker)](https://github.com/tamada/btmeister/pkgs/container/btmeister/)
[![Homebrew](https://img.shields.io/badge/Homebrew-tamada/brew/btmeister-green?logo=homebrew)](https://github.com/tamada/homebrew-brew)

Expand Down
8 changes: 4 additions & 4 deletions src/btmeister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ mod test {
let r = BuildToolDef::parse_from_asset();
assert!(r.is_ok());
if let Ok(result) = r {
assert_eq!(24, result.len());
assert_eq!(25, result.len());
}
}

Expand All @@ -91,7 +91,7 @@ mod test {
let r = construct(None, None);
assert!(r.is_ok());
if let Ok(result) = r {
assert_eq!(24, result.len());
assert_eq!(25, result.len());
}
}

Expand All @@ -100,7 +100,7 @@ mod test {
let r = construct(Some(PathBuf::from("defs/buildtools.json")), None);
assert!(r.is_ok());
if let Ok(result) = r {
assert_eq!(24, result.len());
assert_eq!(25, result.len());
}
}

Expand All @@ -109,7 +109,7 @@ mod test {
let r = construct(None, Some(PathBuf::from("testdata/append_def.json")));
assert!(r.is_ok());
if let Ok(result) = r {
assert_eq!(26, result.len());
assert_eq!(27, result.len());
}
}
}
4 changes: 2 additions & 2 deletions src/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ mod test_print_result {

fn setup() -> Vec<BuildTool> {
let defs = construct(None, None).unwrap();
let def1 = defs.get(11).unwrap();
let def2 = defs.get(8).unwrap();
let def1 = defs.get(12).unwrap();
let def2 = defs.get(9).unwrap();
let bt1 = BuildTool::new(
PathBuf::from_str("testdata/fibonacci/build.gradle").unwrap(),
def1.clone(),
Expand Down

0 comments on commit 87bc0dc

Please sign in to comment.