fix(v3.2.0): 审查修复 3 Blocker
1. $TOTAL_PHASES 7→8 (Phase 8 OTA 后 GUI 进度条溢出) 2. OTA config.json 只在不存在时写入 (保留 lastCheck 冷却) 3. remote URL 比对从硬编码改为动态 $expectedBase Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fa287ae27d
commit
df3a105f92
Binary file not shown.
@ -80,7 +80,7 @@ $GitUrl = "https://code.letcareme.com/bookworm/bookworm-smart-assistant.gi
|
|||||||
$BootUrl = "https://code.letcareme.com/bookworm/bookworm-boot.git"
|
$BootUrl = "https://code.letcareme.com/bookworm/bookworm-boot.git"
|
||||||
$BootDir = Join-Path $ScriptDir "bookworm-boot"
|
$BootDir = Join-Path $ScriptDir "bookworm-boot"
|
||||||
$SecretsEnc = Join-Path $BootDir "secrets.enc"
|
$SecretsEnc = Join-Path $BootDir "secrets.enc"
|
||||||
$TOTAL_PHASES = 7
|
$TOTAL_PHASES = 8
|
||||||
|
|
||||||
# ─── GUI 初始化 ─────────────────────────────────────
|
# ─── GUI 初始化 ─────────────────────────────────────
|
||||||
Add-Type -AssemblyName System.Windows.Forms
|
Add-Type -AssemblyName System.Windows.Forms
|
||||||
@ -1621,7 +1621,7 @@ if (Test-Path (Join-Path $ClaudeDir ".git")) {
|
|||||||
try {
|
try {
|
||||||
$currentRemote = (& git -C $ClaudeDir remote get-url origin 2>$null) -replace '\.git$', ''
|
$currentRemote = (& git -C $ClaudeDir remote get-url origin 2>$null) -replace '\.git$', ''
|
||||||
$expectedBase = ($GitUrl -replace '\.git$', '')
|
$expectedBase = ($GitUrl -replace '\.git$', '')
|
||||||
if ($currentRemote -and $currentRemote -notmatch 'bookworm-smart-assistant') {
|
if ($currentRemote -and $currentRemote -ne $expectedBase) {
|
||||||
Log-Warn "配置仓库 remote 指向旧源: $currentRemote, 切换到 $GitUrl"
|
Log-Warn "配置仓库 remote 指向旧源: $currentRemote, 切换到 $GitUrl"
|
||||||
& git -C $ClaudeDir remote set-url origin $GitUrl 2>$null
|
& git -C $ClaudeDir remote set-url origin $GitUrl 2>$null
|
||||||
Log-OK "remote 已切换到 bookworm-smart-assistant"
|
Log-OK "remote 已切换到 bookworm-smart-assistant"
|
||||||
@ -2632,8 +2632,12 @@ try {
|
|||||||
channel = 'stable'
|
channel = 'stable'
|
||||||
} | ConvertTo-Json -Depth 4
|
} | ConvertTo-Json -Depth 4
|
||||||
$otaConfigPath = Join-Path $otaDir 'config.json'
|
$otaConfigPath = Join-Path $otaDir 'config.json'
|
||||||
|
if (-not (Test-Path $otaConfigPath)) {
|
||||||
[IO.File]::WriteAllText($otaConfigPath, $otaConfig, [Text.UTF8Encoding]::new($false))
|
[IO.File]::WriteAllText($otaConfigPath, $otaConfig, [Text.UTF8Encoding]::new($false))
|
||||||
Log-OK "8c OTA 配置已写入"
|
Log-OK "8c OTA 配置已写入"
|
||||||
|
} else {
|
||||||
|
Log-OK "8c OTA 配置已存在, 保留 lastCheck"
|
||||||
|
}
|
||||||
|
|
||||||
# 8d: 复制 bw-ota.ps1 (从安装器同目录或 BootDir)
|
# 8d: 复制 bw-ota.ps1 (从安装器同目录或 BootDir)
|
||||||
$otaScript = Join-Path $otaDir 'bw-ota.ps1'
|
$otaScript = Join-Path $otaDir 'bw-ota.ps1'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user