xtask: Fix release creating an empty commit on existing release
This commit is contained in:
parent
12ec0fb168
commit
ba642674af
@ -108,6 +108,7 @@ impl ReleaseTask {
|
||||
|
||||
let mut macros = self.macros();
|
||||
|
||||
if self.package.version != self.version {
|
||||
if let Some(m) = macros.as_mut() {
|
||||
println!("Found macros crate {}.", m.name);
|
||||
|
||||
@ -119,10 +120,18 @@ impl ReleaseTask {
|
||||
|
||||
self.package.update_version(&self.version)?;
|
||||
self.package.update_dependants(&self.metadata)?;
|
||||
}
|
||||
|
||||
let changes = &self.package.changes(!prerelease)?;
|
||||
|
||||
if self.package.version != self.version {
|
||||
self.commit()?;
|
||||
} else if !ask_yes_no(&format!(
|
||||
"Package is already version {}. Skip creating a commit and continue?",
|
||||
&self.version
|
||||
))? {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if let Some(m) = macros {
|
||||
let published = m.publish(&self.http_client)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user