parse versions from .bumpversion.toml if args not passed (#2)

This commit is contained in:
Mahmoud 2024-03-03 13:14:59 +02:00 committed by GitHub
parent 5a867eb532
commit c9e019e8f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 174 additions and 74 deletions

View file

@ -64,7 +64,7 @@ pub struct Cli {
/// Version that needs to be updated.
#[arg(long = "current-version", value_name = "VERSION")]
pub current_version: String,
pub current_version: Option<String>,
/// Part of the version to be bumped.
#[arg(
@ -91,12 +91,12 @@ pub struct Cli {
pub serialize: String,
/// Don't write any files, just pretend.
#[arg(short = 'n', long = "dry-run")]
#[arg(short = 'n', long = "dry-run", default_value_t = false)]
pub dry_run: bool,
/// New version that should be in the files.
#[arg(long = "new-version", value_name = "VERSION")]
pub new_version: String,
pub new_version: Option<String>,
/// Create a commit in version control.
#[arg(long = "commit", default_value_t = true)]