45 lines
2.1 KiB
Markdown
45 lines
2.1 KiB
Markdown
# Local Auto Deploy Implementation Plan
|
|
|
|
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
|
|
**Goal:** Turn the local deployment flow from a partly executable command preview into an automatic local deploy runner.
|
|
|
|
**Architecture:** Keep plan generation in `deploy_tool/deployer.py`, but make deployment steps typed so commands that need runtime context can run without shell placeholders. The runner will build backend and frontend, copy frontend artifacts to the output directory, import SQL through stdin, locate the built jar, and start the backend process.
|
|
|
|
**Tech Stack:** Python standard library, `unittest`, `subprocess`, `pathlib`, `shutil`.
|
|
|
|
---
|
|
|
|
### Task 1: Deployment Step Model
|
|
|
|
**Files:**
|
|
- Modify: `deploy_tool/deployer.py`
|
|
- Test: `tests/test_deployer.py`
|
|
|
|
- [x] Add tests showing SQL import steps no longer contain shell redirection and backend start no longer contains jar placeholders.
|
|
- [x] Add fields to `DeploymentStep` for `kind` and optional artifact metadata.
|
|
- [x] Update `build_deployment_plan` to emit executable step metadata.
|
|
- [x] Run `python -m unittest tests.test_deployer`.
|
|
|
|
### Task 2: Automatic Runner
|
|
|
|
**Files:**
|
|
- Modify: `deploy_tool/deployer.py`
|
|
- Test: `tests/test_deployer.py`
|
|
|
|
- [x] Add tests for latest jar discovery under `target` or `build/libs`.
|
|
- [x] Add tests for frontend artifact copy from `dist` or `build`.
|
|
- [x] Add tests with an injected process runner to verify SQL stdin and backend startup command.
|
|
- [x] Implement helper functions and dependency injection points for process execution.
|
|
- [x] Run `python -m unittest tests.test_deployer`.
|
|
|
|
### Task 3: GUI Wording and Verification
|
|
|
|
**Files:**
|
|
- Modify: `deploy_tool/gui.py`
|
|
- Test: `python -m unittest discover -s tests`
|
|
|
|
- [x] Update the confirmation text from partial execution to automatic local deployment.
|
|
- [x] Run `python -m unittest discover -s tests`.
|
|
- [x] Run `python -m py_compile main.py @((Get-ChildItem -LiteralPath .\deploy_tool -Filter *.py).FullName)`.
|