Skip to content

Commit

Permalink
Merge pull request #530 from hannobraun/release
Browse files Browse the repository at this point in the history
Try to trigger release for v0.6.0 again
  • Loading branch information
hannobraun authored May 5, 2022
2 parents ab31378 + c419130 commit 3cc00e3
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions tools/release-operator/src/release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,30 @@ impl Release {
// A release commits need to contain a semver version number.
let version = Regex::new(r"(v?\d+.\d+.\d+)")?
.find_iter(&commit)
.find(|m| semver::Version::parse(m.as_str()).is_ok());
.inspect(|version| {
log::info!(
"Found candidate for version in commit message: {}",
version.as_str(),
);
})
.find(|m| {
let confirmed = semver::Version::parse(m.as_str()).is_ok();

if confirmed {
log::info!("Candidate confirmed.");
} else {
log::info!("Candidate not confirmed.");
}

confirmed
});

match version {
Some(v) => self.hit(v.as_str()),
None => {
log::info!(
"Commit message is missing version number: {commit}",
"Commit message is missing version number:\n\
{commit}",
);
self.miss()
}
Expand Down

0 comments on commit 3cc00e3

Please sign in to comment.