mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 07:20:44 +08:00
- 在 oclaw/ 下重新初始化 Git 仓库 - 补齐子仓库 .gitignore,避免提交本地运行态数据(_local、node_modules、logs 等) - 提交当前工程代码与配置 Made-with: Cursor
33 lines
736 B
PowerShell
33 lines
736 B
PowerShell
param(
|
|
[switch]$Force = $false
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
function Write-Step([string]$msg) {
|
|
Write-Host "==> $msg" -ForegroundColor Cyan
|
|
}
|
|
|
|
$repoRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
|
Set-Location $repoRoot
|
|
|
|
Write-Step "Project root: $repoRoot"
|
|
Write-Step "Stopping stack services..."
|
|
|
|
try {
|
|
python -m oclaw.ops stack down
|
|
Write-Host "Stack stopped." -ForegroundColor Green
|
|
} catch {
|
|
Write-Host "[WARN] stack down failed: $($_.Exception.Message)" -ForegroundColor Yellow
|
|
if (-not $Force) {
|
|
exit 1
|
|
}
|
|
}
|
|
|
|
Write-Step "Current status"
|
|
try {
|
|
python -m oclaw.ops stack status
|
|
} catch {
|
|
Write-Host "[WARN] Unable to read status after stop." -ForegroundColor Yellow
|
|
}
|
|
|