feat(template): add -SkipTier2 switch to skip Tier-2 toolchain installation

Setup-WinBuild2025.ps1:
  - New [switch] \ param (after \)
  - Step 12 block wrapped with if (\) { skip-message } else { ... }
  - Final gate Tier-2 Assert-Step wrapped with if (-not \)

Prepare-WinBuild2025.ps1:
  - New [switch] \ param forwarded to Setup via setupArgs

Validate-SetupState.ps1:
  - New [switch] \ param
  - \ passed into both remote scriptblocks via -ArgumentList
  - Tier-2 Chk calls guarded with if (-not \) in both blocks
This commit is contained in:
Simone
2026-05-11 20:13:58 +02:00
parent 987b36ff3f
commit 1bf7c2347b
3 changed files with 40 additions and 17 deletions
+4
View File
@@ -141,6 +141,9 @@ param(
[string] $GhCliVersion = '2.67.0',
[string] $VcpkgRef = '',
# Skip Tier-2 Toolchain — forwarded to Setup-WinBuild2025.ps1 -SkipTier2
[switch] $SkipTier2,
[switch] $SkipWindowsUpdate,
# Skip disk cleanup inside the VM (cleanmgr + DISM + cache clear) — speeds up re-runs
@@ -386,6 +389,7 @@ try {
}
if ($SkipWindowsUpdate) { $setupArgs['SkipWindowsUpdate'] = $true }
if ($SkipCleanup) { $setupArgs['SkipCleanup'] = $true }
if ($SkipTier2) { $setupArgs['SkipTier2'] = $true }
# ── Run Setup-WinBuild2025.ps1 inside the VM ──────────────────────────────
# Setup may return exit 3010 (ERROR_SUCCESS_REBOOT_REQUIRED) when Windows