Commit 8181fe86 authored by m0sa's avatar m0sa

we don't need to call dotnet msbuild now

parent 829ba167
...@@ -6,8 +6,18 @@ param( ...@@ -6,8 +6,18 @@ param(
$packageOutputFolder = "$PSScriptRoot\.nupkgs" $packageOutputFolder = "$PSScriptRoot\.nupkgs"
# Restore packages and build product # Restore packages and build product
Write-Host "Building..." -ForegroundColor "Green" Write-Host "Restoring..." -ForegroundColor "Green"
dotnet msbuild "$PSScriptRoot\Dapper.sln" /m /v:m /nologo "/t:Restore;Build" /p:Configuration=Debug "/p:PackageVersionSuffix=$PreReleaseSuffix" & dotnet restore -v Minimal # Restore all packages
if ($LASTEXITCODE -ne 0)
{
throw "dotnet restore failed with exit code $LASTEXITCODE"
}
if ($PreReleaseSuffix) {
& dotnet build --version-suffix "$PreReleaseSuffix"
} else {
& dotnet build
}
# Run tests # Run tests
if ($SkipTests) if ($SkipTests)
...@@ -24,5 +34,8 @@ else ...@@ -24,5 +34,8 @@ else
} }
# Package all # Package all
Write-Host "Packaging..." -ForegroundColor "Green" if ($PreReleaseSuffix) {
dotnet msbuild "$PSScriptRoot\Dapper.sln" /m /v:m /nologo "/t:Restore;Build;Pack" /p:Configuration=Release "/p:PackageOutputPath=$packageOutputFolder" "/p:PackageVersionSuffix=$PreReleaseSuffix" & dotnet pack -c Release -o "$packageOutputFolder" --version-suffix "$PreReleaseSuffix"
\ No newline at end of file } else {
& dotnet pack -c Release -o "$packageOutputFolder"
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment