-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.ps1
More file actions
18 lines (15 loc) · 787 Bytes
/
Copy pathbuild.ps1
File metadata and controls
18 lines (15 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$ErrorActionPreference = "Stop"
$PackArguments = $args
dotnet run --project $PSScriptRoot/tools/ConfigFilesGenerator/ConfigFilesGenerator.csproj
if ($LASTEXITCODE -ne 0) {
throw "Generating the configuration files failed with exit code $LASTEXITCODE."
}
# The projects all live in the same folder, so they share the 'src/obj' and 'src/bin' folders
# (project.assets.json, project.nuget.cache, ...). Packing them in parallel makes them race on
# those files, which can make a package silently missing from the output folder.
Get-ChildItem $PSScriptRoot/src/*.csproj | ForEach-Object {
dotnet pack $_ --output $PSScriptRoot/artifacts @PackArguments
if ($LASTEXITCODE -ne 0) {
throw "Packing '$($_.Name)' failed with exit code $LASTEXITCODE."
}
}