Skip to content

Commit

Permalink
version parsing: remove v prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
lheckemann committed Aug 23, 2023
1 parent 02e8454 commit 9b09cd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,9 @@ async fn push_new_release(
(Some(minor), _) => format!("0.{minor}"),
(None, _) if rolling => DEFAULT_ROLLING_PREFIX.to_string(),
(None, Some(tag)) => {
let version_only = tag.strip_prefix("v").unwrap_or(&tag);
// Ensure the version respects semver
semver::Version::from_str(&tag).wrap_err_with(|| eyre!("Failed to parse version `{tag}` as semver, see https://semver.org/ for specifications"))?;
semver::Version::from_str(&version_only).wrap_err_with(|| eyre!("Failed to parse version `{tag}` as semver, see https://semver.org/ for specifications"))?;
tag
}
(None, None) => {
Expand Down

0 comments on commit 9b09cd5

Please sign in to comment.