From a0ef6e98315d5baa37c27ac6c75a16ae99361756 Mon Sep 17 00:00:00 2001 From: Edoardo Marangoni Date: Fri, 26 Apr 2024 19:53:06 +0200 Subject: [PATCH] fix(CLI): Pass the `no_wait` flag to `Deploy` This small patch also changes a couple names of CLI arguments to make them more natural to the end user or reflect the internal names (e.g. `autobump` -> `bump`). --- lib/cli/src/commands/app/create.rs | 6 +++--- lib/cli/src/commands/app/deploy.rs | 8 ++++---- lib/cli/src/commands/publish.rs | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/cli/src/commands/app/create.rs b/lib/cli/src/commands/app/create.rs index 4af09cfa5ac..37a64dac050 100644 --- a/lib/cli/src/commands/app/create.rs +++ b/lib/cli/src/commands/app/create.rs @@ -47,7 +47,7 @@ pub struct CmdAppCreate { /// /// If selected, this might entail the step of publishing the package related to the /// application. By default, the application is not deployed and the package is not published. - #[clap(long)] + #[clap(long = "deploy")] pub deploy_app: bool, /// Skip local schema validation. @@ -371,12 +371,12 @@ impl CmdAppCreate { non_interactive: self.non_interactive, publish_package: true, path: self.app_dir_path.clone(), - no_wait: false, + no_wait: self.no_wait, no_default: false, no_persist_id: false, owner: Some(String::from(owner)), app_name: None, - autobump: false, + bump: false, }; cmd_deploy.run_async().await?; } diff --git a/lib/cli/src/commands/app/deploy.rs b/lib/cli/src/commands/app/deploy.rs index 57a926b33a5..d5e3a422fd4 100644 --- a/lib/cli/src/commands/app/deploy.rs +++ b/lib/cli/src/commands/app/deploy.rs @@ -77,9 +77,9 @@ pub struct CmdAppDeploy { #[clap(long)] pub app_name: Option, - /// Whether or not to autobump the package version if publishing. + /// Whether or not to automatically bump the package version if publishing. #[clap(long)] - pub autobump: bool, + pub bump: bool, } impl CmdAppDeploy { @@ -123,7 +123,7 @@ impl CmdAppDeploy { None => Some(owner), }, non_interactive: self.non_interactive, - autobump: self.autobump, + bump: self.bump, }; match publish_cmd.run_async().await? { @@ -186,7 +186,7 @@ impl CmdAppDeploy { offline: false, owner: None, app_name: None, - no_wait: false, + no_wait: self.no_wait, api: self.api.clone(), fmt: ItemFormatOpts { format: self.fmt.format, diff --git a/lib/cli/src/commands/publish.rs b/lib/cli/src/commands/publish.rs index a1e746eb375..7c47fafa8a7 100644 --- a/lib/cli/src/commands/publish.rs +++ b/lib/cli/src/commands/publish.rs @@ -55,7 +55,7 @@ pub struct Publish { /// Whether or not the patch field of the version of the package - if any - should be bumped. #[clap(long)] - pub autobump: bool, + pub bump: bool, /// Do not prompt for user input. #[clap(long, default_value_t = !std::io::stdin().is_terminal())] @@ -139,7 +139,7 @@ impl AsyncCliCommand for Publish { }; if pkg.version < latest_version { - if self.autobump { + if self.bump { latest_version.patch += 1; version = Some(latest_version); } else if interactive {