generated from dotnet/new-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
all-pack.ps1
23 lines (19 loc) · 823 Bytes
/
all-pack.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env pwsh
./getnuget.ps1
$nuspecs = Get-ChildItem -Recurse ./defs/*.nuspec
$nugetExePath = Join-Path $PSScriptRoot "pkgs/nuget.exe"
$outputDirectory = Join-Path $PSScriptRoot "pkgs/"
# Use workflow to try to parallize nuget packs
workflow PackNuspecs {
param($nugetExePath, $nuspecs, $outputDirectory)
foreach -parallel ($nuspec in $nuspecs) {
InlineScript {
$nuspecPath = $using:nuspec.FullName
$outputDir = $using:outputDirectory
$command = "$using:nugetExePath pack $nuspecPath -OutputDirectory $outputDir"
Write-Output "Executing command: $command"
& $using:nugetExePath pack $nuspecPath -OutputDirectory $outputDir
}
}
}
PackNuspecs -nugetExePath $nugetExePath -nuspecs $nuspecs -outputDirectory $outputDirectory