docs: fix setup command paths
This commit is contained in:
@@ -37,9 +37,11 @@
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
需要 Docker Desktop。仓库根目录的预期命令是:
|
||||
需要 Docker Desktop。可在任意仓库子目录运行:
|
||||
|
||||
```powershell
|
||||
$repoRoot = (git rev-parse --show-toplevel).Trim()
|
||||
Set-Location $repoRoot
|
||||
docker compose -f infra/docker-compose.yml up -d
|
||||
docker compose -f infra/docker-compose.yml ps
|
||||
```
|
||||
@@ -51,12 +53,14 @@ docker compose -f infra/docker-compose.yml ps
|
||||
数据库可用后,在两个独立终端中运行:
|
||||
|
||||
```powershell
|
||||
Set-Location backend
|
||||
$repoRoot = (git rev-parse --show-toplevel).Trim()
|
||||
Set-Location (Join-Path $repoRoot 'backend')
|
||||
go run ./cmd/seed
|
||||
```
|
||||
|
||||
```powershell
|
||||
Set-Location backend
|
||||
$repoRoot = (git rev-parse --show-toplevel).Trim()
|
||||
Set-Location (Join-Path $repoRoot 'backend')
|
||||
go run ./cmd/api
|
||||
```
|
||||
|
||||
@@ -72,7 +76,8 @@ Invoke-RestMethod http://localhost:9150/api/v1/status
|
||||
### Web 开发服务器
|
||||
|
||||
```powershell
|
||||
Set-Location apps/web_v1
|
||||
$repoRoot = (git rev-parse --show-toplevel).Trim()
|
||||
Set-Location (Join-Path $repoRoot 'apps/web_v1')
|
||||
npm ci
|
||||
npm run dev
|
||||
```
|
||||
@@ -84,13 +89,16 @@ npm run dev
|
||||
### 后端
|
||||
|
||||
```powershell
|
||||
Set-Location backend
|
||||
$repoRoot = (git rev-parse --show-toplevel).Trim()
|
||||
Set-Location (Join-Path $repoRoot 'backend')
|
||||
go test ./...
|
||||
```
|
||||
|
||||
本次退出 `0`。为排除 Go 测试缓存影响,还执行了:
|
||||
|
||||
```powershell
|
||||
$repoRoot = (git rev-parse --show-toplevel).Trim()
|
||||
Set-Location (Join-Path $repoRoot 'backend')
|
||||
go test -count=1 ./...
|
||||
```
|
||||
|
||||
@@ -101,8 +109,9 @@ go test -count=1 ./...
|
||||
仅在准备了隔离的实时测试数据库时运行:
|
||||
|
||||
```powershell
|
||||
$env:DATABASE_URL='<隔离测试库连接串>'
|
||||
Set-Location backend
|
||||
$repoRoot = (git rev-parse --show-toplevel).Trim()
|
||||
Set-Location (Join-Path $repoRoot 'backend')
|
||||
$env:DATABASE_URL = '<隔离测试库连接串>'
|
||||
go test -tags integration ./internal/models -run TestPostgresPing -v
|
||||
```
|
||||
|
||||
@@ -111,7 +120,8 @@ go test -tags integration ./internal/models -run TestPostgresPing -v
|
||||
### Web
|
||||
|
||||
```powershell
|
||||
Set-Location apps/web_v1
|
||||
$repoRoot = (git rev-parse --show-toplevel).Trim()
|
||||
Set-Location (Join-Path $repoRoot 'apps/web_v1')
|
||||
node scripts/visual-check.mjs
|
||||
npm run build
|
||||
npm run lint
|
||||
@@ -144,7 +154,8 @@ node scripts/structure-check.mjs
|
||||
### 桌面端
|
||||
|
||||
```powershell
|
||||
Set-Location apps/desktop
|
||||
$repoRoot = (git rev-parse --show-toplevel).Trim()
|
||||
Set-Location (Join-Path $repoRoot 'apps/desktop')
|
||||
npm ci
|
||||
npm run build
|
||||
```
|
||||
@@ -160,7 +171,8 @@ apps/desktop/src-tauri/target/release/senlinai_workbench.exe
|
||||
安装包是独立验证项:
|
||||
|
||||
```powershell
|
||||
Set-Location apps/desktop
|
||||
$repoRoot = (git rev-parse --show-toplevel).Trim()
|
||||
Set-Location (Join-Path $repoRoot 'apps/desktop')
|
||||
npm run bundle
|
||||
```
|
||||
|
||||
@@ -210,4 +222,4 @@ npm run bundle
|
||||
|
||||
## 文档一致性检查
|
||||
|
||||
已对两份文档执行旧品牌、旧 API 前缀、旧前端目录和旧技术栈关键词扫描,结果无匹配。还应抽查 Markdown 相对链接存在,所有命令的工作目录与仓库实际脚本一致。
|
||||
已完成以下一致性检查:两份文档中的旧品牌、旧 API 前缀、旧前端目录和旧技术栈关键词扫描无匹配;Markdown 相对链接均指向现有文件;命令使用的工作目录、入口和脚本均与仓库实际路径一致。
|
||||
|
||||
Reference in New Issue
Block a user