-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclean-build.ps1
More file actions
26 lines (20 loc) · 1001 Bytes
/
clean-build.ps1
File metadata and controls
26 lines (20 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env pwsh
Write-Host '=== Clean Build Script ===' -ForegroundColor Cyan
Write-Host '\nDelegating cleanup to clear.ps1...' -ForegroundColor Yellow
# If clear.ps1 exists, run it. Otherwise run inline cleanup as fallback.
$clearScript = Join-Path $PSScriptRoot 'clear.ps1'
if (Test-Path $clearScript) {
Write-Host 'Running clear.ps1' -ForegroundColor Cyan
& $clearScript
} else {
Write-Host 'clear.ps1 not found — running inline cleanup fallback' -ForegroundColor Yellow
# Inline fallback (same behavior as clear.ps1)
if (Test-Path 'Builds') { Remove-Item -Recurse -Force 'Builds' }
if (Test-Path 'Library') { Remove-Item -Recurse -Force 'Library' }
if (Test-Path 'Temp') { Remove-Item -Recurse -Force 'Temp' }
if (Test-Path 'obj') { Remove-Item -Recurse -Force 'obj' }
}
Write-Host '\nNow running build...' -ForegroundColor Cyan
# Run the build
& .\build.ps1
Write-Host '\n=== Clean Build completed ===' -ForegroundColor Green