Skip to content

Commit

Permalink
Ignore 'v' prefix when searching for versions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hannobraun committed May 5, 2022
1 parent 3cc00e3 commit 0d847eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/release-operator/src/release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down

0 comments on commit 0d847eb

Please sign in to comment.