Skip to content

Commit

Permalink
Change build to use MSBuild
Browse files Browse the repository at this point in the history
See NuGet/Home#4337 for details,
--version-suffix for dotnet pack basically doesn't work for
pre-releases.
  • Loading branch information
NickCraver committed Jul 27, 2018
1 parent 83c30b4 commit a2e8a1d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@ Write-Host "Building Version $Version of all packages" -ForegroundColor "Green"

foreach ($project in $projectsToBuild) {
Write-Host "Working on $project`:" -ForegroundColor "Magenta"

Push-Location ".\src\$project"

Write-Host "Restoring $project..." -ForegroundColor "Magenta"
dotnet restore ".\src\$project"

Write-Host "Packing $project... (Suffix:" -NoNewline -ForegroundColor "Magenta"
Write-Host " Restoring and packing $project... (Suffix:" -NoNewline -ForegroundColor "Magenta"
Write-Host $VersionSuffix -NoNewline -ForegroundColor "Cyan"
Write-Host ")" -ForegroundColor "Magenta"
dotnet pack ".\src\$project" -c Release -o $packageOutputFolder --version-suffix=$VersionSuffix /p:CI=true

dotnet msbuild "/t:Restore;Pack" "/p:Configuration=Release" "/p:VersionSuffix=$VersionSuffix" "/p:PackageOutputPath=$packageOutputFolder" "/p:CI=true"

Pop-Location

Write-Host "Done."
wRite-Host ""
Write-Host ""
}

0 comments on commit a2e8a1d

Please sign in to comment.