From 7531ed9ba89b0a74fc337022a2e749531ec2612d Mon Sep 17 00:00:00 2001 From: minecraft1024a Date: Fri, 22 Aug 2025 13:03:36 +0800 Subject: [PATCH] =?UTF-8?q?feat(plugin):=20=E5=85=BC=E5=AE=B9=20alpha=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=B9=B6=E6=9B=B4=E6=96=B0=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在版本比较器中增加对 alpha 版本号的兼容性处理,现在可以正确解析如 `0.10.0-alpha-1` 格式的版本。 --- src/plugin_system/utils/manifest_utils.py | 1 + src/plugins/built_in/maizone_refactored/_manifest.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugin_system/utils/manifest_utils.py b/src/plugin_system/utils/manifest_utils.py index d070b733c..2cec91760 100644 --- a/src/plugin_system/utils/manifest_utils.py +++ b/src/plugin_system/utils/manifest_utils.py @@ -54,6 +54,7 @@ class VersionComparator: # 移除snapshot部分 normalized = re.sub(r"-snapshot\.\d+", "", version.strip()) + normalized = re.sub(r"-alpha\-\d+", "", version.strip()) # 确保版本号格式正确 if not re.match(r"^\d+(\.\d+){0,2}$", normalized): diff --git a/src/plugins/built_in/maizone_refactored/_manifest.json b/src/plugins/built_in/maizone_refactored/_manifest.json index a1b13c727..d462b8e48 100644 --- a/src/plugins/built_in/maizone_refactored/_manifest.json +++ b/src/plugins/built_in/maizone_refactored/_manifest.json @@ -11,7 +11,7 @@ "host_application": { "min_version": "0.8.0", - "max_version": "0.10.0" + "max_version": "0.11.0" }, "homepage_url": "https://github.com/MaiBot-Plus/MaiMbot-Pro-Max", "repository_url": "https://github.com/MaiBot-Plus/MaiMbot-Pro-Max", @@ -47,4 +47,4 @@ "历史记录避重" ] } -} \ No newline at end of file +}