Skip to content

Commit

Permalink
Merge pull request #408 from boozook/rem-init-dry-run
Browse files Browse the repository at this point in the history
Remove `dry-run` for init/new
  • Loading branch information
boozook authored Jul 17, 2024
2 parents 7248136 + 719b637 commit 23b3e44
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
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

0 comments on commit 23b3e44

Please sign in to comment.