From 0d847ebeba6c633230a448b0e27109a5aae3bc78 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Thu, 5 May 2022 18:38:45 +0200 Subject: [PATCH] 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!(