Skip to content

Commit

Permalink
[plugin] accept rustup defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Apr 17, 2024
1 parent 6382d0f commit 8833d97
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dagger.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rust",
"sdk": "github.com/fluentci-io/daggerverse/deno-sdk@main",
"version": "v0.10.2",
"version": "v0.10.3",
"description": "",
"author": "Tsiry Sandratraina",
"license": "MIT"
Expand Down
14 changes: 7 additions & 7 deletions example/.fluentci/plugin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn setup() -> FnResult<String> {
.pipeline("setup")?
.pkgx()?
.with_packages(vec!["curl"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.stdout()?;
Ok(stdout)
}
Expand All @@ -26,7 +26,7 @@ pub fn clippy() -> FnResult<String> {
.pipeline("clippy")?
.pkgx()?
.with_packages(vec!["curl", "wget"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.with_exec(vec!["rustup", "component", "add", "clippy"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "cargo", "install", "clippy-sarif", "--version", "0.3.0"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH","cargo", "install", "sarif-fmt", "--version", "0.3.0"])?
Expand All @@ -49,7 +49,7 @@ pub fn llvmcov() -> FnResult<String> {
.pipeline("llvmcov")?
.pkgx()?
.with_packages(vec!["curl", "wget"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.with_exec(vec!["rustup", "component", "add", "llvm-tools"])?
.with_exec(vec![
"wget",
Expand Down Expand Up @@ -79,7 +79,7 @@ pub fn test(args: String) -> FnResult<String> {
.pipeline("test")?
.pkgx()?
.with_packages(vec!["curl"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "cargo", "test", &args])?
.stdout()?;
Ok(stdout)
Expand All @@ -93,7 +93,7 @@ pub fn build(args: String) -> FnResult<String> {
.pipeline("build")?
.pkgx()?
.with_packages(vec!["curl"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "cargo", "build", &args])?
.stdout()?;
Ok(stdout)
Expand All @@ -107,7 +107,7 @@ pub fn target_add(args: String) -> FnResult<String> {
.pipeline("target_add")?
.pkgx()?
.with_packages(vec!["curl"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "rustup", "target", "add", &args])?
.stdout()?;
Ok(stdout)
Expand All @@ -121,7 +121,7 @@ pub fn component_add(args: String) -> FnResult<String> {
.pipeline("component_add")?
.pkgx()?
.with_packages(vec![ "curl"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "rustup", "component", "add", &args])?
.stdout()?;
Ok(stdout)
Expand Down
2 changes: 1 addition & 1 deletion plugin/Cargo.lock

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

2 changes: 1 addition & 1 deletion plugin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "rust"
version = "0.10.2"
version = "0.10.3"

[lib]
crate-type = ["cdylib"]
Expand Down
14 changes: 7 additions & 7 deletions plugin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn setup() -> FnResult<String> {
.pipeline("setup")?
.pkgx()?
.with_packages(vec!["curl"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.stdout()?;
Ok(stdout)
}
Expand All @@ -26,7 +26,7 @@ pub fn clippy() -> FnResult<String> {
.pipeline("clippy")?
.pkgx()?
.with_packages(vec!["curl", "wget"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.with_exec(vec!["rustup", "component", "add", "clippy"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "cargo", "install", "clippy-sarif", "--version", "0.3.0"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH","cargo", "install", "sarif-fmt", "--version", "0.3.0"])?
Expand All @@ -49,7 +49,7 @@ pub fn llvmcov() -> FnResult<String> {
.pipeline("llvmcov")?
.pkgx()?
.with_packages(vec!["curl", "wget"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.with_exec(vec!["rustup", "component", "add", "llvm-tools"])?
.with_exec(vec![
"wget",
Expand Down Expand Up @@ -79,7 +79,7 @@ pub fn test(args: String) -> FnResult<String> {
.pipeline("test")?
.pkgx()?
.with_packages(vec!["curl"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "cargo", "test", &args])?
.stdout()?;
Ok(stdout)
Expand All @@ -93,7 +93,7 @@ pub fn build(args: String) -> FnResult<String> {
.pipeline("build")?
.pkgx()?
.with_packages(vec!["curl"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "cargo", "build", &args])?
.stdout()?;
Ok(stdout)
Expand All @@ -107,7 +107,7 @@ pub fn target_add(args: String) -> FnResult<String> {
.pipeline("target_add")?
.pkgx()?
.with_packages(vec!["curl"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "rustup", "target", "add", &args])?
.stdout()?;
Ok(stdout)
Expand All @@ -121,7 +121,7 @@ pub fn component_add(args: String) -> FnResult<String> {
.pipeline("component_add")?
.pkgx()?
.with_packages(vec![ "curl"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"])?
.with_exec(vec!["type rustup > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -- -y"])?
.with_exec(vec!["PATH=$HOME/.cargo/bin:$PATH", "rustup", "component", "add", &args])?
.stdout()?;
Ok(stdout)
Expand Down

0 comments on commit 8833d97

Please sign in to comment.