Skip to content

Commit

Permalink
Merge pull request #199 from serilog-contrib/dev
Browse files Browse the repository at this point in the history
Fix version suffixing
  • Loading branch information
nblumhardt authored Jun 21, 2022
2 parents 5e00be6 + 624f1ab commit 34c144a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,12 @@ echo "build: Version suffix is $suffix"
& dotnet test -c Release "./test/$projectName.Tests/$projectName.Tests.csproj"
if ($LASTEXITCODE -ne 0) { throw "dotnet test failed" }

$src = "./src/$projectName"

& dotnet build -c Release --version-suffix=$suffix "$src/$projectName.csproj"
if ($LASTEXITCODE -ne 0) { throw "dotnet build failed" }
$csproj = "./src/$projectName/$projectName.csproj"

if ($suffix) {
& dotnet pack -c Release -o ./artifacts --no-build --version-suffix=$suffix "$src/$projectName.csproj"
& dotnet pack "$csproj" -c Release -o ./artifacts --version-suffix=$suffix
} else {
& dotnet pack -c Release -o ./artifacts --no-build "$src/$projectName.csproj"
& dotnet pack "$csproj" -c Release -o ./artifacts
}
if ($LASTEXITCODE -ne 0) { throw "dotnet pack failed" }

Expand Down

0 comments on commit 34c144a

Please sign in to comment.