diff --git a/Build.ps1 b/Build.ps1 index bd1260f..7c5a85f 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -14,9 +14,29 @@ $revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUI $suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"] echo "build: Version suffix is $suffix" -msbuild serilog-sinks-loggly.sln /m /t:restore /p:Configuration=Release -msbuild serilog-sinks-loggly.sln /t:build /m /p:Configuration=Release /p:VersionSuffix=$suffix -msbuild "src/Serilog.Sinks.Loggly/Serilog.Sinks.Loggly.csproj" /t:pack /p:Configuration=Release /p:VersionSuffix=$suffix /p:PackageOutputPath=artifacts /p:NoPackageAnalysis=true + +foreach ($src in ls src/*) { + Push-Location $src + + echo "build: Packaging project in $src" + + & dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix + if($LASTEXITCODE -ne 0) { exit 1 } + + 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 +} + foreach ($test in ls test/*.Tests) { Push-Location $test @@ -27,4 +47,5 @@ foreach ($test in ls test/*.Tests) { Pop-Location } + Pop-Location