初始化询价智能体新仓:同步本地工程并排除密钥与 .env。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
$Root = "E:\wwwroot"
|
||||
$ops = Join-Path $Root "ops"
|
||||
New-Item -ItemType Directory -Force -Path $ops | Out-Null
|
||||
$intent = @{
|
||||
cutoverTarget = "replace-yutongda"
|
||||
deployRoot = $Root
|
||||
oldRoot = "C:\yutongda"
|
||||
phase = "P0-isolation-until-ready"
|
||||
decidedAt = "2026-09-12"
|
||||
note = "YTD_ENV stays test until P1; do not connect jeecg-boot/ytd_runtime/ytd:prod:/ytd-inquiry"
|
||||
checklist = "deploy/CUTOVER-TO-PROD.md"
|
||||
} | ConvertTo-Json
|
||||
Set-Content -Path (Join-Path $ops "cutover-intent.json") -Value $intent -Encoding UTF8
|
||||
|
||||
# annotate .env if present (idempotent)
|
||||
$envFile = Join-Path $Root ".env"
|
||||
if (Test-Path $envFile) {
|
||||
$raw = Get-Content $envFile -Raw
|
||||
if ($raw -notmatch "YTD_CUTOVER_TARGET=") {
|
||||
Add-Content -Path $envFile -Value "`r`n# scheme B: replace C:\yutongda; see deploy/CUTOVER-TO-PROD.md`r`nYTD_CUTOVER_TARGET=replace-yutongda`r`nYTD_DEPLOY_ROOT=E:\wwwroot`r`n"
|
||||
Write-Output "ENV_ANNOTATED"
|
||||
} else {
|
||||
Write-Output "ENV_ALREADY_ANNOTATED"
|
||||
}
|
||||
}
|
||||
Get-Content (Join-Path $ops "cutover-intent.json")
|
||||
Write-Output "INTENT_OK"
|
||||
Reference in New Issue
Block a user