Files
blance 83e16ed6cd Replace Unicode arrows/dashes with ASCII in engine.ps1 and run-all.ps1
Windows PowerShell (5.1) reads .ps1 files without a UTF-8 BOM using the
system codepage, which mangles multi-byte UTF-8 characters like -> and --
into garbage that includes smart-quote characters PowerShell treats as
string terminators - this broke parsing on Melissa's PC (error at
engine.ps1:283, cascading missing-brace errors above it). Sticking to plain
ASCII avoids the whole encoding-dependent failure class.
2026-07-05 19:18:26 -05:00

32 lines
1.0 KiB
PowerShell

# Run uploads for ALL entities under the Entities\ folder
$scriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
$entitiesDir = Join-Path $scriptRoot "Entities"
if (-not (Test-Path $entitiesDir)) {
Write-Host "ERROR: Entities\ folder not found." -ForegroundColor Red
exit 1
}
$entities = Get-ChildItem -Path $entitiesDir -Directory |
Where-Object { Test-Path (Join-Path $_.FullName "entity.json") }
if ($entities.Count -eq 0) {
Write-Host "No entity folders with entity.json found under Entities\." -ForegroundColor Yellow
exit 0
}
Write-Host "Found $($entities.Count) entity/entities to process."
$anyFail = $false
foreach ($entity in $entities) {
& powershell.exe -ExecutionPolicy Bypass -File (Join-Path $scriptRoot "engine.ps1") -EntityDir $entity.FullName
if ($LASTEXITCODE -ne 0) { $anyFail = $true }
}
Write-Host ""
if (-not $anyFail) {
Write-Host "All entities complete." -ForegroundColor Green
} else {
Write-Host "One or more entities had failures - check output above." -ForegroundColor Yellow
}