@@ -7,8 +7,6 @@ if(Test-Path .\artifacts) {
7
7
Remove-Item .\artifacts - Force - Recurse
8
8
}
9
9
10
- & dotnet restore -- no- cache
11
-
12
10
$branch = @ { $true = $env: APPVEYOR_REPO_BRANCH ; $false = $ (git symbolic- ref -- short - q HEAD) }[$env: APPVEYOR_REPO_BRANCH -ne $NULL ];
13
11
$revision = @ { $true = " {0:00000}" -f [convert ]::ToInt32(" 0" + $env: APPVEYOR_BUILD_NUMBER , 10 ); $false = " local" }[$env: APPVEYOR_BUILD_NUMBER -ne $NULL ];
14
12
$suffix = @ { $true = " " ; $false = " $ ( $branch.Substring (0 , [math ]::Min(10 , $branch.Length ))) -$revision " }[$branch -eq " main" -and $revision -ne " local" ]
@@ -18,43 +16,20 @@ $buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($c
18
16
echo " build: Package version suffix is $suffix "
19
17
echo " build: Build version suffix is $buildSuffix "
20
18
21
- foreach ($src in gci src/* ) {
22
- Push-Location $src
23
-
24
- echo " build: Packaging project in $src "
25
-
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 - p:ContinuousIntegrationBuild= true
30
- } else {
31
- & dotnet pack - c Release -- include- source -- no- build - o ../ ../ artifacts - p:ContinuousIntegrationBuild= true
32
- }
33
- if ($LASTEXITCODE -ne 0 ) { exit 1 }
34
-
35
- Pop-Location
36
- }
37
-
38
- foreach ($test in gci test/* .Tests) {
39
- Push-Location $test
40
-
41
- echo " build: Testing project in $test "
19
+ & dotnet build -- configuration Release -- version- suffix= $buildSuffix / p:ContinuousIntegrationBuild= true
42
20
43
- & dotnet test - c Release
44
- if ($LASTEXITCODE -ne 0 ) { exit 3 }
21
+ if ($LASTEXITCODE -ne 0 ) { exit 1 }
45
22
46
- Pop-Location
23
+ if ($suffix ) {
24
+ & dotnet pack src\Serilog.Settings.Configuration -- configuration Release -- no- build -- no- restore - o artifacts -- version- suffix= $suffix
25
+ } else {
26
+ & dotnet pack src\Serilog.Settings.Configuration -- configuration Release -- no- build -- no- restore - o artifacts
47
27
}
48
28
49
- foreach ($test in gci test/* .PerformanceTests) {
50
- Push-Location $test
29
+ if ($LASTEXITCODE -ne 0 ) { exit 2 }
51
30
52
- echo " build: Building performance test project in $test "
31
+ Write-Output " build: Testing "
53
32
54
- & dotnet build - c Release
55
- if ($LASTEXITCODE -ne 0 ) { exit 2 }
56
-
57
- Pop-Location
58
- }
33
+ & dotnet test test\Serilog.Settings.Configuration.Tests -- configuration Release -- no- build -- no- restore
59
34
60
- Pop-Location
35
+ if ( $LASTEXITCODE -ne 0 ) { exit 3 }
0 commit comments