only semvercheck for publishable

This commit is contained in:
Ulf Lilleengen 2025-08-16 13:17:54 +02:00
parent ce42dd5da5
commit 7357810814

View File

@ -357,6 +357,7 @@ fn main() -> Result<()> {
let weight = rgraph.node_weight(node).unwrap(); let weight = rgraph.node_weight(node).unwrap();
println!("Preparing {}", weight); println!("Preparing {}", weight);
let mut c = ctx.crates.get_mut(weight).unwrap(); let mut c = ctx.crates.get_mut(weight).unwrap();
if c.publish {
let ver = semver::Version::parse(&c.version)?; let ver = semver::Version::parse(&c.version)?;
let newver = if let Err(_) = check_semver(&c) { let newver = if let Err(_) = check_semver(&c) {
println!("Semver check failed, bumping minor!"); println!("Semver check failed, bumping minor!");
@ -368,7 +369,6 @@ fn main() -> Result<()> {
println!("Updating {} from {} -> {}", weight, c.version, newver.to_string()); println!("Updating {} from {} -> {}", weight, c.version, newver.to_string());
let newver = newver.to_string(); let newver = newver.to_string();
if c.publish {
update_version(&mut c, &newver)?; update_version(&mut c, &newver)?;
let c = ctx.crates.get(weight).unwrap(); let c = ctx.crates.get(weight).unwrap();
@ -382,8 +382,6 @@ fn main() -> Result<()> {
// Update changelog // Update changelog
update_changelog(&ctx.root, &c)?; update_changelog(&ctx.root, &c)?;
} else {
update_version(&mut c, &newver)?;
} }
} }