diff options
Diffstat (limited to 'xtask/src/main.rs')
-rw-r--r-- | xtask/src/main.rs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 5dd79c2..ebdeecb 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -32,12 +32,12 @@ fn main() -> Result<()> { match cli.command { Commands::OutDir => println!("{}", out_dir()?.display()), - Commands::Dist { check } => { - let version = match version(cli.pre_release) { - Ok(_) if check => std::process::exit(0), - Err(_) if check => std::process::exit(1), - res => res?, - }; + Commands::Version => match version(cli.pre_release) { + Ok(v) => println!("{v}"), + Err(_) => std::process::exit(1), + }, + Commands::Dist => { + let version = version(cli.pre_release)?; let targz = generate_tar_gz(version)?; println!("{}", targz.display()); } @@ -63,13 +63,13 @@ enum Commands { /// Print the default value of OUT_DIR used by cargo when building the package. OutDir, - /// Generate distributable package - Dist { - /// Validate a git tag matching the package version exists and exit. - #[arg(short, long, required = false)] - check: bool, - }, + /// Validate a git tag matching the package version exists and print version. + Version, + /// Generate distributable package. + Dist, + + /// Automation for create a new release. Release(release::Release), } |