support configloader deployment

This commit is contained in:
Nathan
2025-11-10 10:43:46 -07:00
parent dfc113ea38
commit 124ad9e3b6
4 changed files with 2441 additions and 10 deletions

View File

@@ -1,12 +1,12 @@
# Refresh helper batch scripts within a specific project directory.
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
param(
[string]$ProjectPath
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
if (-not $PSScriptRoot) {
$PSScriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
}
@@ -101,7 +101,7 @@ foreach ($spec in $specs) {
foreach ($target in $targets) {
try {
Copy-Item -Path $spec.Source -Destination $target.FullName -Force
Write-Host " $($target.FullName)" -ForegroundColor Green
Write-Host "[OK] $($target.FullName)" -ForegroundColor Green
$updated++
$targetDir = $target.Directory.FullName
@@ -111,14 +111,14 @@ foreach ($spec in $specs) {
Copy-Item -Path $asset.Source -Destination (Join-Path -Path $targetDir -ChildPath $asset.Name) -Force
}
catch {
Write-Host " Failed to copy $($asset.Name) into $targetDir: $($_.Exception.Message)" -ForegroundColor Red
Write-Host " [FAIL] Failed to copy $($asset.Name) into ${targetDir}: $($_.Exception.Message)" -ForegroundColor Red
}
}
$touchedDirs[$targetDir] = $true
}
}
catch {
Write-Host " $($target.FullName)" -ForegroundColor Red
Write-Host "[FAIL] $($target.FullName)" -ForegroundColor Red
Write-Host " $($_.Exception.Message)" -ForegroundColor DarkRed
$failed++
}
@@ -129,7 +129,7 @@ foreach ($spec in $specs) {
Updated = $updated
Failed = $failed
Skipped = 0
Total = $targets.Count
Total = @($targets).Count
}
}