Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions cargo-shuttle/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ pub struct RunArgs {
/// Uses bacon crate to run the project in watch mode
#[arg(long)]
pub bacon: bool,
/// Suppress non-error output
#[arg(long, short = 'q')]
pub quiet: bool,

#[command(flatten)]
pub secret_args: SecretsArgs,
Expand Down
30 changes: 18 additions & 12 deletions cargo-shuttle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1334,11 +1334,13 @@ impl Shuttle {

let project_directory = self.ctx.project_directory();

println!(
"{} {}",
" Building".bold().green(),
project_directory.display()
);
if !run_args.quiet {
println!(
"{} {}",
" Building".bold().green(),
project_directory.display()
);
}

build_workspace(project_directory, run_args.release, tx).await
}
Expand Down Expand Up @@ -1403,13 +1405,15 @@ impl Shuttle {
});
tokio::spawn(async move { ProvisionerServer::run(state, &api_addr).await });

println!(
"\n {} {} on http://{}:{}\n",
"Starting".bold().green(),
service.target_name,
ip,
run_args.port,
);
if !run_args.quiet {
println!(
"\n {} {} on http://{}:{}\n",
"Starting".bold().green(),
service.target_name,
ip,
run_args.port,
);
}

let mut envs = vec![
("SHUTTLE_BETA", "true".to_owned()),
Expand All @@ -1424,6 +1428,8 @@ impl Shuttle {
// Use a nice debugging tracing level if user does not provide their own
if debug && std::env::var("RUST_LOG").is_err() {
envs.push(("RUST_LOG", "info,shuttle=trace,reqwest=debug".to_owned()));
} else if run_args.quiet && std::env::var("RUST_LOG").is_err() {
envs.push(("RUST_LOG", "info,shuttle=error".to_owned()));
}

info!(
Expand Down
1 change: 1 addition & 0 deletions cargo-shuttle/tests/integration/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ async fn shuttle_run(working_directory: &str, external: bool) -> String {
release: false,
raw: false,
bacon: false,
quiet: false,
secret_args: Default::default(),
}),
},
Expand Down