workspacer_cli/
bump_workspace.rs1crate::ix!();
3
4#[derive(Debug, StructOpt, Getters, Setters)]
6#[getset(get = "pub")]
7pub struct BumpWorkspaceCommand {
8 #[structopt(long = "path")]
10 workspace_path: Option<PathBuf>,
11
12 #[structopt(long = "skip-git-check")]
14 skip_git_check: bool,
15
16 #[structopt(long = "release", default_value = "patch")]
18 release_arg: ReleaseArg,
19}
20
21impl BumpWorkspaceCommand {
22 pub async fn run(&self) -> Result<(), WorkspaceError> {
23 let ReleaseArg(release_type) = self.release_arg().clone();
24 run_with_workspace(
26 self.workspace_path().clone(),
27 *self.skip_git_check(),
28 move |ws| {
29 Box::pin(async move {
30 ws.bump_all(release_type.clone()).await.map_err(|bump_err| {
33 error!("Failed to bump all crates in workspace: {:?}", bump_err);
35 WorkspaceError::from(bump_err)
36 })?;
37
38 info!("Successfully bumped entire workspace with release={:?}", release_type);
39 Ok(())
40 })
41 },
42 )
43 .await
44 }
45}