diff --git a/Build.ps1 b/Build.ps1 index 7454f3c..8283851 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -16,29 +16,45 @@ $commitHash = $(git rev-parse --short HEAD) $buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""] echo "build: Package version suffix is $suffix" -echo "build: Build version suffix is $buildSuffix" +echo "build: Build version suffix is $buildSuffix" foreach ($src in ls src/*) { - Push-Location $src + Push-Location $src echo "build: Packaging project in $src" - & dotnet build -c Release --version-suffix=$buildSuffix - & dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix --no-build - if($LASTEXITCODE -ne 0) { exit 1 } + & dotnet build -c Release --version-suffix=$buildSuffix - Pop-Location + if($suffix) { + & dotnet pack -c Release --include-source --no-build -o ..\..\artifacts --version-suffix=$suffix + } else { + & dotnet pack -c Release --include-source --no-build -o ..\..\artifacts + } + if($LASTEXITCODE -ne 0) { exit 1 } + + Pop-Location } foreach ($test in ls test/*.Tests) { - Push-Location $test + Push-Location $test echo "build: Testing project in $test" - & dotnet test -c Release - if($LASTEXITCODE -ne 0) { exit 3 } + & dotnet test -c Release + if($LASTEXITCODE -ne 0) { exit 3 } + + Pop-Location +} + +foreach ($test in ls test/*.PerformanceTests) { + Push-Location $test + + echo "build: Building performance test project in $test" + + & dotnet build -c Release + if($LASTEXITCODE -ne 0) { exit 2 } - Pop-Location + Pop-Location } Pop-Location \ No newline at end of file