V45.34: ban cai phai SACH - engine.spec loai dev config (DB/.secret_key/plugin_dirs.json/sf_scan_state.json) khoi bundle; build_install.ps1 + build_windows.ps1 fail-fast neu dist dinh config dev (reset ve mac dinh cho nguoi dung moi)

This commit is contained in:
2026-09-01 11:31:10 +07:00
parent 4713f8a8a1
commit 1932467539
3 changed files with 28 additions and 2 deletions
+12 -1
View File
@@ -39,7 +39,18 @@ if ($LASTEXITCODE -ne 0) {
exit 1
}
Write-Host "== [4/4] Copy vao install\ =="
Write-Host "== [4/4] Verify bundle sach (khong config dev) + copy vao install\ =="
# Ban cai phai reset ve mac dinh: KHONG duoc mang theo DB/password/secret/
# plugin-dirs/scan-state cua dev sang may nguoi dung moi.
$devFiles = Get-ChildItem "dist\daw_engine" -Recurse -File -ErrorAction SilentlyContinue | Where-Object {
$_.Name -in @(".secret_key", "plugin_dirs.json", "sf_scan_state.json", "sf_scan_state.json.bak-root") -or
$_.Extension -eq ".db"
}
if ($devFiles) {
Write-Host "ERROR: bundle chua config dev - DUNG TAO BAN CAI:" -ForegroundColor Red
$devFiles | ForEach-Object { Write-Host " $($_.FullName)" -ForegroundColor Red }
exit 1
}
New-Item -ItemType Directory -Force "install" | Out-Null
if (Test-Path "install\daw_engine") { Remove-Item -Recurse -Force "install\daw_engine" }
Copy-Item "dist\daw_engine\*" "install\daw_engine\" -Recurse -Force