diff --git a/Build.ps1 b/Build.ps1 index 14f9fbd..d3d6764 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -24,7 +24,13 @@ foreach ($src in ls src/*) { echo "build: Packaging project in $src" & dotnet build -c Release --version-suffix=$buildSuffix - & dotnet pack -c Release --include-symbols -o ..\..\artifacts --version-suffix=$suffix --no-build + if($LASTEXITCODE -ne 0) { exit 1 } + + if ($suffix) { + & dotnet pack -c Release --include-symbols -o ..\..\artifacts --version-suffix=$suffix --no-build + } else { + & dotnet pack -c Release --include-symbols -o ..\..\artifacts --no-build + } if($LASTEXITCODE -ne 0) { exit 1 } Pop-Location