summaryrefslogtreecommitdiff
path: root/ListAllSamples.ps1
diff options
context:
space:
mode:
author5an7y <[email protected]>2026-03-20 15:09:27 -0700
committer5an7y <[email protected]>2026-03-20 15:09:27 -0700
commit9cd8d031aa48669e9e3cc11886d856ce52d6ce20 (patch)
tree9b805fe25899b9f75474938efd2f1de1b07b39db /ListAllSamples.ps1
parent8e3b051532deef78849c15f96ce79b5f3b21b911 (diff)
Refactor Build-Samples.ps1 and fix ListAllSamples NuGet filter
Build-Samples.ps1: - Extract helper functions for readability (Resolve-BuildEnvironment, Import-SampleExclusions, Initialize-DevShell, Assert-MsBuildAvailable, Get-DiskFreeGB) - Add #Requires -Version 7.0 - Fix build_number to explicit [int] cast (was string from regex) - Fix multi-socket CPU handling (sum LogicalProcessors) - Fix NuGet path detection to use absolute repo root path - Support wildcard patterns in exclusion paths (-like vs ContainsKey) - Guard Invoke-Item for CI/automation (skip in non-interactive sessions) - Validate sample directories exist before building - Wrap Get-Volume in try/catch for UNC/network drives - Use Write-Host with carriage return for progress (Write-Progress unreliable in -Parallel runspaces) - Clean up variable names and add section comments - Use switch instead of if/elseif for exit codes ListAllSamples.ps1: - Fix NuGet packages filter regex to catch packages anywhere in path (was only matching paths starting with packages) Samples.txt: - Regenerated with fixed filter, remove BOM Co-authored-by: Copilot <[email protected]>
Diffstat (limited to 'ListAllSamples.ps1')
-rw-r--r--ListAllSamples.ps12
1 files changed, 1 insertions, 1 deletions
diff --git a/ListAllSamples.ps1 b/ListAllSamples.ps1
index ed87fc83..f533c080 100644
--- a/ListAllSamples.ps1
+++ b/ListAllSamples.ps1
@@ -4,7 +4,7 @@
.DESCRIPTION
Searches for all .sln files recursively from the repo root, excludes NuGet package directories
- (paths starting with 'packages.'), computes a normalized sample name for each, and writes
+ (paths containing 'packages' as a segment), computes a normalized sample name for each, and writes
the sorted list to Samples.txt (one sample name per line).
The sample name is derived from the relative directory path: backslashes are replaced with dots