sem-version 0.0.0

Automatically retrieve the next version to release based on your commits.
Documentation
use clap::Parser;
use std::path::PathBuf;

/// Automatically retrieve the next version to release based on your commits.
#[derive(Parser, Debug)]
#[clap(author, version, about, long_about = None)]
struct Args {
    /// The location of the repository to check [default: "."]
    path: Option<PathBuf>,

    /// Debug mode enable more output when running the tool.
    #[clap(short = 'D', long, action)]
    debug: bool,

    /// The list of commit type that won't increment any version tag. This field can also be a
    /// regex if start with ^ and end with $
    #[clap(
        short = '0',
        long,
        default_values = ["build","ci","docs","style","refactor","test","chore"]
    )]
    level0: Vec<String>,

    /// The list of commit type that will increment patch version tag. This field can also be a
    /// regex if start with ^ and end with $
    #[clap(short = '1', long, default_values = ["fix","perf"])]
    level1: Vec<String>,

    /// The list of commit type that will increment minor version tag. This field can also be a
    /// regex if start with ^ and end with $
    #[clap(short = '2', long, default_values = ["feat"])]
    level2: Vec<String>,

    /// The list of commit type that will increment major version tag. This field can also be a
    /// regex if start with ^ and end with $
    #[clap(short = '3', long, default_values = ["^.+!$"])]
    level3: Vec<String>,

    /// The list of branches that will generate a release and increment the version tag. This field can also be a
    /// regex if start with ^ and end with $
    #[clap(long, alias = "release", default_values = ["main"])]
    release_branches: Vec<String>,

    /// The list of commit type that will generate a pre-release and increment the channel tag. This field can also be a
    /// regex if start with ^ and end with $
    #[clap(long, alias = "prerelease", default_values = ["main"])]
    prerelease_branches: Vec<String>,

    /// If true, all values read from git and this tool input will be treated as lowercase.
    #[clap(long, short, action)]
    case_sensitive: bool,
}

fn main() {
    let args = Args::parse();

    let debug = args.debug;

    if debug {
        println!("Runtime values are {:#?}", &args);
    }
}