Skip to content

Commit

Permalink
fix(CLI): Pass the no_wait flag to Deploy
Browse files Browse the repository at this point in the history
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`).
  • Loading branch information
xdoardo authored and theduke committed Apr 29, 2024
1 parent 95726cf commit a57cbb5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions lib/cli/src/commands/app/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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?;
}
Expand Down
8 changes: 4 additions & 4 deletions lib/cli/src/commands/app/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ pub struct CmdAppDeploy {
#[clap(long)]
pub app_name: Option<String>,

/// 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 {
Expand Down Expand Up @@ -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? {
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions lib/cli/src/commands/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())]
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit a57cbb5

Please sign in to comment.