Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dry-run for init/new #408

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion 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 cargo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-playdate"
version = "0.5.2"
version = "0.5.3"
readme = "README.md"
description = "Build tool for neat yellow console."
keywords = ["playdate", "build", "cargo", "plugin", "cargo-subcommand"]
Expand Down
14 changes: 8 additions & 6 deletions cargo/src/cli/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,17 @@ fn build() -> Command {
)
.arg_future_incompat_report()
.arg_timings()
// Issue: https://github.com/clap-rs/clap/issues/5081
._arg(flag("keep-going", "Do not abort the build as soon as there is an error"))
.arg_dry_run("Enable dry-run mode")
// Issue: https://github.com/clap-rs/clap/issues/5081
._arg(flag("keep-going", "Do not abort the build as soon as there is an error"))
// hide currently not supported targets:
.mut_arg("test", |arg| arg.hide(true))
.mut_arg("tests", |arg| arg.hide(true))
.mut_arg("bench", |arg| arg.hide(true))
.mut_arg("benches", |arg| arg.hide(true))
// add exclusive shorthands:
.args(special_args_for(&Cmd::Build))
.arg(extra_arg())
.arg(extra_arg())
}


Expand All @@ -166,11 +167,12 @@ fn run() -> Command {
)
.arg_future_incompat_report()
.arg_timings()
.arg_dry_run("Enable dry-run mode")
// Issue: https://github.com/clap-rs/clap/issues/5081
._arg(flag("keep-going", "Do not abort the build as soon as there is an error"))
// add exclusive shorthands:
.args(special_args_for(&Cmd::Run))
.arg(extra_arg())
.arg(extra_arg())
}

fn package() -> Command {
Expand Down Expand Up @@ -198,6 +200,7 @@ fn publish() -> Command {
fn assets() -> Command {
Command::new(Cmd::Assets.as_ref()).ignore_errors(true)
.about("Collect assets for a local package and all of its dependencies")
.arg_dry_run("Enable dry-run mode")
.arg_build_plan()
.arg_unit_graph()
.arg_package_spec(
Expand Down Expand Up @@ -459,7 +462,7 @@ pub fn globals() -> Command { add_globals(Command::new("")) }

fn add_globals(cmd: Command) -> Command {
let cmd =
cmd.arg_dry_run("Enable dry-run mode")
cmd
.arg(flag("quiet", "Do not print cargo log messages").short('q').global(true))
.arg_silent_suggestion()
.arg(opt("verbose", "Use verbose output (-vv extra verbose output)").short('v')
Expand Down Expand Up @@ -493,7 +496,6 @@ fn add_globals(cmd: Command) -> Command {
.arg_message_format();

let cmd = cmd.mut_arg("quiet", |arg| arg.global(true).env("CARGO_TERM_QUIET"))
.mut_arg("dry-run", |arg| arg.global(true))
.mut_arg("target-dir", |arg| arg.global(true))
.mut_arg("features", |arg| arg.global(true))
.mut_arg("all-features", |arg| arg.global(true))
Expand Down
Loading