Add backend-only deployment option

This commit is contained in:
王鹏
2026-10-09 09:40:30 +08:00
parent 414218c0bd
commit eb5a276f44
5 changed files with 67 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ class DeploymentConfig:
backend_port: str = "8080"
user_frontend_port: str = "8082"
admin_frontend_port: str = "8081"
backend_only: bool = False
output_dir: Path | None = None
tool_paths: Mapping[str, str | Path] | None = None
tool_search_roots: Iterable[Path] | None = None
@@ -86,7 +87,7 @@ def build_deployment_plan(scan: ScanResult, config: DeploymentConfig) -> list[De
description = "构建 SSM WAR 应用" if backend_is_ssm else "打包 Spring Boot 应用"
steps.append(DeploymentStep("构建后端", command, backend_dir, description, kind="backend_build"))
frontends = scan.detected_frontends
frontends = [] if config.backend_only else scan.detected_frontends
for frontend in frontends:
display_name = frontend.metadata.get("display_name", frontend.path.name)
npm_command = _tool_command(config, "npm", _default_npm_command())