@@ -12,26 +12,20 @@ if(Test-Path .\artifacts) {
1212$branch = @ { $true = $env: APPVEYOR_REPO_BRANCH ; $false = $ (git symbolic- ref -- short - q HEAD) }[$NULL -ne $env: APPVEYOR_REPO_BRANCH ];
1313$revision = @ { $true = " {0:00000}" -f [convert ]::ToInt32(" 0" + $env: APPVEYOR_BUILD_NUMBER , 10 ); $false = " local" }[$NULL -ne $env: APPVEYOR_BUILD_NUMBER ];
1414$suffix = @ { $true = " " ; $false = " $ ( $branch.Substring (0 , [math ]::Min(10 , $branch.Length ))) -$revision " }[$branch -eq " main" -and $revision -ne " local" ]
15- $commitHash = $ (git rev- parse -- short HEAD)
16- $buildSuffix = @ { $true = " $ ( $suffix ) -$ ( $commitHash ) " ; $false = " $ ( $branch ) -$ ( $commitHash ) " }[$suffix -ne " " ]
1715
1816Write-Output " build: Package version suffix is $suffix "
19- Write-Output " build: Build version suffix is $buildSuffix "
2017
2118foreach ($src in Get-ChildItem src/* ) {
2219 Push-Location $src
2320
2421 Write-Output " build: Packaging project in $src "
2522
26- & dotnet build - c Release -- version- suffix= $buildSuffix
27- if ($LASTEXITCODE -ne 0 ) { throw " Failed" }
28-
29- if ($suffix ) {
30- & dotnet pack - c Release -- include- source -- no- build - o ../ ../ artifacts -- version- suffix= $suffix
23+ if ($suffix ) {
24+ & dotnet pack - c Release -- include- source - o ../ ../ artifacts -- version- suffix= $suffix
3125 } else {
32- & dotnet pack - c Release -- include- source -- no - build - o ../ ../ artifacts
26+ & dotnet pack - c Release -- include- source - o ../ ../ artifacts
3327 }
34- if ($LASTEXITCODE -ne 0 ) { throw " Failed " }
28+ if ($LASTEXITCODE -ne 0 ) { throw " Packaging failed " }
3529
3630 Pop-Location
3731}
@@ -42,18 +36,7 @@ foreach ($test in Get-ChildItem test/*.Tests) {
4236 Write-Output " build: Testing project in $test "
4337
4438 & dotnet test - c Release
45- if ($LASTEXITCODE -ne 0 ) { throw " Failed" }
46-
47- Pop-Location
48- }
49-
50- foreach ($test in ls test/* .PerformanceTests) {
51- Push-Location $test
52-
53- Write-Output " build: Building performance test project in $test "
54-
55- & dotnet build - c Release
56- if ($LASTEXITCODE -ne 0 ) { throw " Failed" }
39+ if ($LASTEXITCODE -ne 0 ) { throw " Testing failed" }
5740
5841 Pop-Location
5942}
0 commit comments