Clarify update check when local is newer
ci / test (push) Waiting to run
ci / fuzz-smoke (push) Waiting to run
ci / windows-client (push) Waiting to run
ci / package-release (linux-x86_64, ubuntu-latest) (push) Waiting to run
ci / package-release (macos-aarch64, macos-14) (push) Waiting to run
ci / package-release (macos-x86_64, macos-13) (push) Waiting to run
ci / package-release (windows-x86_64, windows-latest) (push) Waiting to run
ci / publish-gitea-release (push) Blocked by required conditions
ci / remote-bench (push) Waiting to run
ci / test (push) Waiting to run
ci / fuzz-smoke (push) Waiting to run
ci / windows-client (push) Waiting to run
ci / package-release (linux-x86_64, ubuntu-latest) (push) Waiting to run
ci / package-release (macos-aarch64, macos-14) (push) Waiting to run
ci / package-release (macos-x86_64, macos-13) (push) Waiting to run
ci / package-release (windows-x86_64, windows-latest) (push) Waiting to run
ci / publish-gitea-release (push) Blocked by required conditions
ci / remote-bench (push) Waiting to run
This commit is contained in:
Generated
+1
-1
@@ -436,7 +436,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dosh"
|
||||
version = "1.0.0-rc40"
|
||||
version = "1.0.0-rc41"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "dosh"
|
||||
version = "1.0.0-rc40"
|
||||
version = "1.0.0-rc41"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
|
||||
|
||||
@@ -4120,7 +4120,7 @@ fn update_version_status(local: &str, latest: &str) -> &'static str {
|
||||
match compare_dotted_versions(latest, local) {
|
||||
std::cmp::Ordering::Equal => "current",
|
||||
std::cmp::Ordering::Greater => "update available",
|
||||
std::cmp::Ordering::Less => "different",
|
||||
std::cmp::Ordering::Less => "local newer than latest release",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11222,7 +11222,14 @@ mod tests {
|
||||
fn update_version_status_compares_numeric_parts() {
|
||||
assert_eq!(update_version_status("0.1.5", "0.1.5"), "current");
|
||||
assert_eq!(update_version_status("0.1.9", "0.1.10"), "update available");
|
||||
assert_eq!(update_version_status("1.0.0", "0.9.9"), "different");
|
||||
assert_eq!(
|
||||
update_version_status("1.0.0", "0.9.9"),
|
||||
"local newer than latest release"
|
||||
);
|
||||
assert_eq!(
|
||||
update_version_status("1.0.0-rc40", "1.0.0-rc37"),
|
||||
"local newer than latest release"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user