build: replace version-compare crate with semver

closes #399
This commit is contained in:
Christian Visintin
2026-03-21 10:58:59 +01:00
parent 1bd990bca7
commit 024f156fc8
3 changed files with 9 additions and 10 deletions

View File

@@ -132,8 +132,13 @@ impl Update {
/// Check wether new version is higher than new version
fn is_new_version_higher(new_version: &str, current_version: &str) -> bool {
version_compare::compare(new_version, current_version).unwrap_or(version_compare::Cmp::Lt)
== version_compare::Cmp::Gt
match (
semver::Version::parse(new_version),
semver::Version::parse(current_version),
) {
(Ok(new), Ok(current)) => new > current,
_ => false,
}
}
}
impl From<Status> for UpdateStatus {