Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init: Prefer ref instead of rev-or-ref #151

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading