Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Commit

Permalink
Update Build.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirdresher authored Aug 8, 2017
1 parent edc8908 commit d6c01dc
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -27,4 +47,5 @@ foreach ($test in ls test/*.Tests) {

Pop-Location
}

Pop-Location

0 comments on commit d6c01dc

Please sign in to comment.