xtask: Fix release creating an empty commit on existing release
This commit is contained in:
parent
12ec0fb168
commit
ba642674af
@ -108,21 +108,30 @@ impl ReleaseTask {
|
||||
|
||||
let mut macros = self.macros();
|
||||
|
||||
if let Some(m) = macros.as_mut() {
|
||||
println!("Found macros crate {}.", m.name);
|
||||
if self.package.version != self.version {
|
||||
if let Some(m) = macros.as_mut() {
|
||||
println!("Found macros crate {}.", m.name);
|
||||
|
||||
m.update_version(&self.version)?;
|
||||
m.update_dependants(&self.metadata)?;
|
||||
m.update_version(&self.version)?;
|
||||
m.update_dependants(&self.metadata)?;
|
||||
|
||||
println!("Resuming release of {}…", self.title());
|
||||
println!("Resuming release of {}…", self.title());
|
||||
}
|
||||
|
||||
self.package.update_version(&self.version)?;
|
||||
self.package.update_dependants(&self.metadata)?;
|
||||
}
|
||||
|
||||
self.package.update_version(&self.version)?;
|
||||
self.package.update_dependants(&self.metadata)?;
|
||||
|
||||
let changes = &self.package.changes(!prerelease)?;
|
||||
|
||||
self.commit()?;
|
||||
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