From 3fb6d55299583680e04fe5b0c650b3d5e0d4830a Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Thu, 5 May 2022 18:27:38 +0200 Subject: [PATCH] Add more logging to release operator --- tools/release-operator/src/release.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/release-operator/src/release.rs b/tools/release-operator/src/release.rs index 5cd250fbcf..8d92c247f2 100644 --- a/tools/release-operator/src/release.rs +++ b/tools/release-operator/src/release.rs @@ -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()),