use anyhow::Result;
use clap::Subcommand;
#[derive(Subcommand, Debug)]
pub enum VersionAction {
Init {
#[arg(help = "Initial version number (e.g., 1.0.0)")]
version: Option<String>,
},
Info,
Increment {
#[arg(help = "Increment type")]
#[arg(value_enum)]
#[arg(default_value = "patch")]
increment_type: IncrementType,
},
Set { #[arg(help = "New version number")] version: String },
History,
UpdateCargo,
Config { #[command(subcommand)] action: VersionConfigAction },
}
#[derive(Debug, Clone, clap::ValueEnum)]
pub enum IncrementType {
Patch,
Minor,
Major,
}
#[derive(Subcommand, Debug)]
pub enum VersionConfigAction {
Enable,
Disable,
Policy { #[arg(value_enum)] policy: IncrementType },
Show,
}
impl std::fmt::Display for IncrementType {
fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
unimplemented!()
}
}
impl std::str::FromStr for IncrementType {
type Err = String;
fn from_str(_s: &str) -> Result<Self, Self::Err> {
unimplemented!()
}
}
pub fn handle_version(_action: VersionAction) -> Result<()> {
unimplemented!()
}
pub fn version_action_to_args(_action: &VersionAction) -> Vec<String> {
unimplemented!()
}