Skip to content

Commit

Permalink
Add more logging to release operator
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed May 5, 2022
1 parent 842b0b3 commit 3fb6d55
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tools/release-operator/src/release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,23 @@ 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()),
Expand Down

0 comments on commit 3fb6d55

Please sign in to comment.