Skip to content

Commit

Permalink
[plugin] fix bazel install
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Apr 19, 2024
1 parent ac5d9db commit 8bab31a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 deletions.
2 changes: 1 addition & 1 deletion example/.fluentci/plugin/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use fluentci_pdk::dag;
pub fn setup_bazel() -> Result<String, Error> {
let stdout = dag()
.pkgx()?
.with_exec(vec!["pkgx", "install", "bazel", "bazelisk"])?
.with_exec(vec!["pkgx", "install", "bazelisk"])?
.stdout()?;
Ok(stdout)
}
18 changes: 14 additions & 4 deletions example/.fluentci/plugin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ pub fn setup() -> FnResult<String> {
pub fn test() -> FnResult<String> {
let stdout = dag()
.pkgx()?
.with_packages(vec!["bazel", "bazelisk"])?
.with_exec(vec!["bazelisk", "test", "//..."])?
.with_exec(vec![
"pkgx",
"+github.com/bazelbuild/bazelisk",
"bazelisk",
"test",
"//...",
])?
.stdout()?;
Ok(stdout)
}
Expand All @@ -25,8 +30,13 @@ pub fn test() -> FnResult<String> {
pub fn build() -> FnResult<String> {
let stdout = dag()
.pkgx()?
.with_packages(vec!["bazel", "bazelisk"])?
.with_exec(vec!["bazelisk", "build", "//..."])?
.with_exec(vec![
"pkgx",
"+github.com/bazelbuild/bazelisk",
"bazelisk",
"build",
"//...",
])?
.stdout()?;
Ok(stdout)
}
2 changes: 1 addition & 1 deletion plugin/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use fluentci_pdk::dag;
pub fn setup_bazel() -> Result<String, Error> {
let stdout = dag()
.pkgx()?
.with_exec(vec!["pkgx", "install", "bazel", "bazelisk"])?
.with_exec(vec!["pkgx", "install", "bazelisk"])?
.stdout()?;
Ok(stdout)
}
18 changes: 14 additions & 4 deletions plugin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ pub fn setup() -> FnResult<String> {
pub fn test() -> FnResult<String> {
let stdout = dag()
.pkgx()?
.with_packages(vec!["bazel", "bazelisk"])?
.with_exec(vec!["bazelisk", "test", "//..."])?
.with_exec(vec![
"pkgx",
"+github.com/bazelbuild/bazelisk",
"bazelisk",
"test",
"//...",
])?
.stdout()?;
Ok(stdout)
}
Expand All @@ -25,8 +30,13 @@ pub fn test() -> FnResult<String> {
pub fn build() -> FnResult<String> {
let stdout = dag()
.pkgx()?
.with_packages(vec!["bazel", "bazelisk"])?
.with_exec(vec!["bazelisk", "build", "//..."])?
.with_exec(vec![
"pkgx",
"+github.com/bazelbuild/bazelisk",
"bazelisk",
"build",
"//...",
])?
.stdout()?;
Ok(stdout)
}

0 comments on commit 8bab31a

Please sign in to comment.