Pin MySQL installer to 8.0.43
This commit is contained in:
@@ -10,6 +10,7 @@ from .deployer import DeploymentConfig, build_deployment_plan, run_steps
|
||||
from .environment import EnvironmentCheck, check_environment, load_tool_paths, save_tool_paths
|
||||
from .installer import (
|
||||
MAVEN_VERSION,
|
||||
MYSQL_VERSION,
|
||||
TOMCAT_VERSION,
|
||||
build_install_command,
|
||||
install_maven,
|
||||
@@ -371,7 +372,7 @@ class DeployWorkbench(tk.Tk):
|
||||
mysql_note = ""
|
||||
if tool_name == "MySQL":
|
||||
mysql_note = (
|
||||
"\n\n将安装 MySQL Community Server 及官方工具。首次安装后,请在部署配置中填写实际的 "
|
||||
f"\n\n将安装 MySQL Community Server {MYSQL_VERSION} 及官方工具。首次安装后,请在部署配置中填写实际的 "
|
||||
"root 用户密码;程序不会生成、保存或显示默认数据库密码。"
|
||||
)
|
||||
if not messagebox.askyesno(
|
||||
|
||||
@@ -35,6 +35,7 @@ MAVEN_DOWNLOAD_BASE = f"https://dlcdn.apache.org/maven/maven-3/{MAVEN_VERSION}/b
|
||||
TOMCAT_VERSION = "9.0.122"
|
||||
TOMCAT_ARCHIVE_NAME = f"apache-tomcat-{TOMCAT_VERSION}-windows-x64.zip"
|
||||
TOMCAT_DOWNLOAD_BASE = f"https://dlcdn.apache.org/tomcat/tomcat-9/v{TOMCAT_VERSION}/bin"
|
||||
MYSQL_VERSION = "8.0.43"
|
||||
|
||||
ANSI_PATTERN = re.compile(r"\x1b\[[0-?]*[ -/]*[@-~]")
|
||||
PERCENT_PATTERN = re.compile(r"(\d{1,3})\s*%")
|
||||
@@ -76,16 +77,21 @@ def build_install_command(tool_name: str, version: str | None = None) -> list[st
|
||||
package_id = WINGET_PACKAGES.get(tool_name)
|
||||
if not package_id:
|
||||
raise ValueError(f"\u4e0d\u652f\u6301\u81ea\u52a8\u5b89\u88c5: {tool_name}")
|
||||
return [
|
||||
command = [
|
||||
"winget",
|
||||
"install",
|
||||
"--exact",
|
||||
"--id",
|
||||
package_id,
|
||||
]
|
||||
if tool_name == "MySQL":
|
||||
command.extend(["--version", MYSQL_VERSION])
|
||||
command.extend([
|
||||
"--accept-source-agreements",
|
||||
"--accept-package-agreements",
|
||||
"--disable-interactivity",
|
||||
]
|
||||
])
|
||||
return command
|
||||
|
||||
|
||||
def default_maven_install_root() -> Path:
|
||||
|
||||
Reference in New Issue
Block a user