fix according to feedback
This commit is contained in:
parent
fcc6471618
commit
ab9d1c48a8
1 changed files with 17 additions and 13 deletions
|
@ -1,26 +1,30 @@
|
||||||
Push-Location $PSScriptRoot
|
. "$PSScriptRoot\..\..\scripts\_common.ps1"
|
||||||
[Environment]::CurrentDirectory = $PWD
|
|
||||||
|
|
||||||
$ProjectsDir = "..\..\src"
|
$IntermediatePackagesDir = "$RepoRoot\artifacts\packages\intermediate"
|
||||||
$IntermediatePackagesDir = "..\..\artifacts\packages\intermediate"
|
$PackagesDir = "$RepoRoot\artifacts\packages"
|
||||||
$PackagesDir = "..\..\artifacts\packages"
|
|
||||||
|
|
||||||
New-Item -ItemType Directory -Force -Path $IntermediatePackagesDir
|
New-Item -ItemType Directory -Force -Path $IntermediatePackagesDir
|
||||||
|
|
||||||
foreach ($file in [System.IO.Directory]::EnumerateFiles($ProjectsDir, "project.json", "AllDirectories")) {
|
$Projects = @(
|
||||||
& dotnet restore "$file"
|
"Microsoft.DotNet.Cli.Utils",
|
||||||
|
"Microsoft.DotNet.ProjectModel",
|
||||||
|
"Microsoft.DotNet.ProjectModel.Workspaces",
|
||||||
|
"Microsoft.DotNet.Runtime",
|
||||||
|
"Microsoft.Extensions.Testing.Abstractions"
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach ($ProjectName in $Projects) {
|
||||||
|
$ProjectFile = "$RepoRoot\src\$ProjectName\project.json"
|
||||||
|
& dotnet restore "$ProjectFile"
|
||||||
if (!$?) {
|
if (!$?) {
|
||||||
Write-Host "dotnet restore failed for: $file"
|
Write-Host "dotnet restore failed for: $ProjectFile"
|
||||||
Exit 1
|
Exit 1
|
||||||
}
|
}
|
||||||
& dotnet pack "$file" --output "$IntermediatePackagesDir"
|
& dotnet pack "$ProjectFile" --output "$IntermediatePackagesDir"
|
||||||
if (!$?) {
|
if (!$?) {
|
||||||
Write-Host "dotnet pack failed for: $file"
|
Write-Host "dotnet pack failed for: $ProjectFile"
|
||||||
Exit 1
|
Exit 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Get-ChildItem $IntermediatePackagesDir -Filter *.nupkg | Copy-Item -Destination $PackagesDir
|
Get-ChildItem $IntermediatePackagesDir -Filter *.nupkg | Copy-Item -Destination $PackagesDir
|
||||||
|
|
||||||
Pop-Location
|
|
||||||
[Environment]::CurrentDirectory = $PWD
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue