Skip to content

Commit

Permalink
Merge pull request #151 from a-kenji/init/prefer-ref-over-ref-or-rev
Browse files Browse the repository at this point in the history
init: Prefer `ref` instead of `rev-or-ref`
  • Loading branch information
a-kenji authored Sep 4, 2024
2 parents 9bf38d8 + a695c53 commit cd6185e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ impl Updater {
maybe_version = normalized_version.to_string();
}

// If we init the version specifier we don't care if before there was already a
// working version.
// If we init the version specifier we don't care if there was already a
// correct semver specified, we automatically pin to the latest semver.
if !init {
let _version = match semver::Version::parse(&maybe_version) {
Ok(v) => v,
Expand All @@ -134,7 +134,7 @@ impl Updater {

tags.sort();
if let Some(change) = tags.get_latest_tag() {
if *is_params {
if *is_params || init {
let _ = parsed.params.r#ref(Some(change.to_string()));
} else {
let _ = parsed.r#type.ref_or_rev(Some(change.to_string()));
Expand Down

0 comments on commit cd6185e

Please sign in to comment.