fix(xtask): error if new version supplied to bump-version is less than

or equal to current version
This commit is contained in:
WillLillis 2025-03-12 22:11:22 -04:00 committed by Christian Clason
parent 07a1b7fc00
commit 5985690d45

View file

@ -127,6 +127,11 @@ pub fn run(args: BumpVersion) -> Result<()> {
}
next_version
};
if next_version <= current_version {
return Err(anyhow!(format!(
"Next version {next_version} must be greater than current version {current_version}"
)));
}
println!("Bumping from {current_version} to {next_version}");
update_crates(&current_version, &next_version)?;