Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions Build-GitHubPackages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,19 @@ if (Test-Path $outputPath) {
New-Item -ItemType Directory -Force -Path $outputPath | Out-Null
New-Item -ItemType Directory -Force -Path (Split-Path $catalogFullPath -Parent) | Out-Null

$nuspecFiles = @(Get-ChildItem -Path (Join-Path $repoRoot 'src') -Filter 'Package.nuspec' -File -Recurse | Sort-Object FullName)
$packageRoots = @('src', 'tests')
$nuspecFiles = @(
$packageRoots |
ForEach-Object {
$root = Join-Path $repoRoot $_
if (Test-Path $root) {
Get-ChildItem -Path $root -Filter 'Package.nuspec' -File -Recurse
}
} |
Sort-Object FullName
)
if ($nuspecFiles.Count -eq 0) {
throw 'No Package.nuspec files were found beneath src.'
throw 'No Package.nuspec files were found beneath src or tests.'
}

$packages = @()
Expand Down
Loading