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:
@@ -137,6 +137,15 @@ if ($doEngine) {
|
||||
if ($LASTEXITCODE -ne 0) { Fail "pyinstaller that bai" }
|
||||
python tools\verify_bundle.py
|
||||
if ($LASTEXITCODE -ne 0) { Fail "Bundle thieu asset - dung build, kiem tra engine.spec datas" }
|
||||
# Ban cai phai SACH: khong duoc mang theo DB/password/secret/scan-state cua dev.
|
||||
$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) {
|
||||
$devFiles | ForEach-Object { Write-Host " DEV-CONFIG: $($_.FullName)" -ForegroundColor Red }
|
||||
Fail "Bundle chua config dev - DUNG TAO BAN CAI"
|
||||
}
|
||||
if (-not (Test-Path "dist\daw_engine\daw_engine.exe")) { Fail "dist\daw_engine\daw_engine.exe khong ton tai (onedir build loi?)" }
|
||||
if (Test-Path "src-tauri\resources\daw_engine") { Remove-Item -Recurse -Force "src-tauri\resources\daw_engine" }
|
||||
New-Item -ItemType Directory -Force "src-tauri\resources\daw_engine" | Out-Null
|
||||
|
||||
Reference in New Issue
Block a user