commit_wizard/cli/cmd/bump/
mod.rs1use clap::Args as ClapArgs;
2
3use crate::{
4 cli::CliResult,
5 core::{context::Context, version},
6};
7
8#[derive(Debug, Clone, ClapArgs)]
9#[command(
10 about = "Calculate the next semantic version based on the active Commit Wizard rules and selected commit history"
11)]
12pub struct Args {
13 #[arg(long)]
15 pub from: Option<String>,
16
17 #[arg(long, default_value = "HEAD")]
19 pub to: String,
20
21 #[arg(long, alias = "count", value_name = "N")]
23 pub tail: Option<u32>,
24}
25
26pub async fn run(ctx: &Context, args: Args) -> CliResult<()> {
27 version::bump::run(ctx, args.from, args.to, args.tail)
28}