From 0d847ebeba6c633230a448b0e27109a5aae3bc78 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Thu, 5 May 2022 18:38:45 +0200 Subject: [PATCH 1/3] Ignore 'v' prefix when searching for versions It's optional anyway, so this should make zero difference to what the regular expression finds. However, with the 'v' there, it's going to be part of the match when it founds. This won't parse correctly then, using `semver::Version::parse`, as a 'v' prefix is not a valid part of a version. --- tools/release-operator/src/release.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release-operator/src/release.rs b/tools/release-operator/src/release.rs index 8d92c247f..e7cfeec1d 100644 --- a/tools/release-operator/src/release.rs +++ b/tools/release-operator/src/release.rs @@ -43,7 +43,7 @@ impl Release { let commit: String = cmd_lib::run_fun!(git log -n 1 "${sha}")?; // A release commits need to contain a semver version number. - let version = Regex::new(r"(v?\d+.\d+.\d+)")? + let version = Regex::new(r"(\d+.\d+.\d+)")? .find_iter(&commit) .inspect(|version| { log::info!( From cfc97439fcbf7a9143cdda63fe856b1d0a158ae5 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Thu, 5 May 2022 18:40:59 +0200 Subject: [PATCH 2/3] Fix version regex The regex finds lot of stuff in the commit message that looks nothing like a version. Escaping the various '.' should do it. --- tools/release-operator/src/release.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release-operator/src/release.rs b/tools/release-operator/src/release.rs index e7cfeec1d..2c3fb11a0 100644 --- a/tools/release-operator/src/release.rs +++ b/tools/release-operator/src/release.rs @@ -43,7 +43,7 @@ impl Release { let commit: String = cmd_lib::run_fun!(git log -n 1 "${sha}")?; // A release commits need to contain a semver version number. - let version = Regex::new(r"(\d+.\d+.\d+)")? + let version = Regex::new(r"(\d+\.\d+\.\d+)")? .find_iter(&commit) .inspect(|version| { log::info!( From dae126fc28016597d28a73f387731b05b5c42ec0 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Thu, 5 May 2022 18:42:11 +0200 Subject: [PATCH 3/3] Try again to trigger release for v0.6.0