From 463553988c115985ef077f023fab0b82274021ed Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Thu, 23 Jan 2025 11:11:20 +0100 Subject: [PATCH] Support offline upgrade up to v1.12.7 --- crates/meilitool/src/upgrade/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/meilitool/src/upgrade/mod.rs b/crates/meilitool/src/upgrade/mod.rs index 2d5230341..9044f6c0c 100644 --- a/crates/meilitool/src/upgrade/mod.rs +++ b/crates/meilitool/src/upgrade/mod.rs @@ -44,9 +44,9 @@ impl OfflineUpgrade { } const FIRST_SUPPORTED_UPGRADE_FROM_VERSION: &str = "1.9.0"; - const LAST_SUPPORTED_UPGRADE_FROM_VERSION: &str = "1.12.5"; + const LAST_SUPPORTED_UPGRADE_FROM_VERSION: &str = "1.12.7"; const FIRST_SUPPORTED_UPGRADE_TO_VERSION: &str = "1.10.0"; - const LAST_SUPPORTED_UPGRADE_TO_VERSION: &str = "1.12.5"; + const LAST_SUPPORTED_UPGRADE_TO_VERSION: &str = "1.12.7"; let upgrade_list = [ ( @@ -73,7 +73,7 @@ impl OfflineUpgrade { ("1", "10", _) => 1, ("1", "11", _) => 2, ("1", "12", "0" | "1" | "2") => 3, - ("1", "12", "3" | "4" | "5") => no_upgrade, + ("1", "12", "3" | "4" | "5" | "6" | "7") => no_upgrade, _ => { bail!("Unsupported current version {current_major}.{current_minor}.{current_patch}. Can only upgrade from versions in range [{}-{}]", FIRST_SUPPORTED_UPGRADE_FROM_VERSION, @@ -87,7 +87,7 @@ impl OfflineUpgrade { ("1", "10", _) => 0, ("1", "11", _) => 1, ("1", "12", "0" | "1" | "2") => 2, - ("1", "12", "3" | "4" | "5") => 3, + ("1", "12", "3" | "4" | "5" | "6" | "7") => 3, (major, _, _) if major.starts_with('v') => { bail!("Target version must not starts with a `v`. Instead of writing `v1.9.0` write `1.9.0` for example.") }