mod release;
mod release_pr;
mod update;
use std::path::{Path, PathBuf};
use release_plz_core::CARGO_TOML;
use self::{release::Release, release_pr::ReleasePr, update::Update};
#[derive(clap::Parser, Debug)]
#[clap(about, version, author)]
pub struct CliArgs {
#[clap(subcommand)]
pub command: Command,
#[clap(short, long)]
pub verbose: bool,
}
#[derive(clap::Subcommand, Debug)]
pub enum Command {
Update(Update),
ReleasePr(ReleasePr),
Release(Release),
}
fn local_manifest(project_manifest: Option<&Path>) -> PathBuf {
match project_manifest {
Some(manifest) => manifest.to_path_buf(),
None => std::env::current_dir()
.expect("cannot retrieve current directory")
.join(CARGO_TOML),
}
}