diff --git a/crates/datashed/src/commands/version.rs b/crates/datashed/src/commands/version.rs index 701357e..ff9d02c 100644 --- a/crates/datashed/src/commands/version.rs +++ b/crates/datashed/src/commands/version.rs @@ -2,15 +2,18 @@ use clap::Parser; use crate::prelude::*; -/// Get or set the version of the data pod. +/// Get or set the version of the datashed. #[derive(Debug, Parser)] pub(crate) struct Version { /// Whether to overwrite the current version or not. #[arg(short, long)] force: bool, - /// The new version of the data pod. Unless the `--force` option is - /// set, the new version must be greater than the current version. + /// The new version of the datashed. Unless the `--force`/`-f` + /// option is set, the new version must be greater than the + /// current version. A datashed version consists of three + /// separated integers, which must conform to the semantic + /// versioning standard; invalid version strings are rejected. version: Option, } @@ -21,11 +24,8 @@ impl Version { if let Some(version) = self.version { if !self.force && version <= config.metadata.version { - bail!( - "{} must be greater than {}", - version, - config.metadata.version - ); + let current = config.metadata.version.to_string(); + bail!("{version} must be greater than {current}"); } config.metadata.version = version;