@@ -3,8 +3,8 @@ echo "build: Build started"
33Push-Location $PSScriptRoot
44
55if (Test-Path .\artifacts) {
6- echo " build: Cleaning ./ artifacts"
7- Remove-Item ./ artifacts - Force - Recurse
6+ echo " build: Cleaning .\ artifacts"
7+ Remove-Item .\ artifacts - Force - Recurse
88}
99
1010& dotnet restore -- no- cache
@@ -16,43 +16,42 @@ $commitHash = $(git rev-parse --short HEAD)
1616$buildSuffix = @ { $true = " $ ( $suffix ) -$ ( $commitHash ) " ; $false = " $ ( $branch ) -$ ( $commitHash ) " }[$suffix -ne " " ]
1717
1818echo " build: Package version suffix is $suffix "
19- echo " build: Build version suffix is $buildSuffix "
19+ echo " build: Build version suffix is $buildSuffix "
2020
21- foreach ($src in gci src/* ) {
21+ foreach ($src in ls src/* ) {
2222 Push-Location $src
2323
2424 echo " build: Packaging project in $src "
2525
26- & dotnet build - c Release -- version- suffix= $buildSuffix
27-
28- if ($suffix ) {
29- & dotnet pack - c Release -- include- source -- no- build - o ../ ../ artifacts -- version- suffix= $suffix
26+ & dotnet build - c Release -- version- suffix= $buildSuffix - p:EnableSourceLink= true
27+ if ($suffix ) {
28+ & dotnet pack - c Release - o ..\..\artifacts -- version- suffix= $suffix -- no- build
3029 } else {
31- & dotnet pack - c Release -- include - source -- no - build - o ../ .. / artifacts
30+ & dotnet pack - c Release - o ..\..\ artifacts -- no - build
3231 }
33- if ($LASTEXITCODE -ne 0 ) { throw " build failed" }
32+ if ($LASTEXITCODE -ne 0 ) { throw " build failed" }
3433
3534 Pop-Location
3635}
3736
38- foreach ($test in gci test/* .Tests) {
37+ foreach ($test in ls test/* .Tests) {
3938 Push-Location $test
4039
4140 echo " build: Testing project in $test "
4241
4342 & dotnet test - c Release
44- if ($LASTEXITCODE -ne 0 ) { throw " test failed" }
43+ if ($LASTEXITCODE -ne 0 ) { throw " tests failed" }
4544
4645 Pop-Location
4746}
4847
4948foreach ($test in ls test/* .PerformanceTests) {
5049 Push-Location $test
5150
52- echo " build: Building performance test project in $test "
51+ echo " build: Building project in $test "
5352
5453 & dotnet build - c Release
55- if ($LASTEXITCODE -ne 0 ) { throw " perf test build failed" }
54+ if ($LASTEXITCODE -ne 0 ) { throw " performance test build failed" }
5655
5756 Pop-Location
5857}
0 commit comments