-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from serilog/dev
2.1.0 Release
- Loading branch information
Showing
5 changed files
with
68 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,51 @@ | ||
echo "build: Build started" | ||
|
||
Push-Location $PSScriptRoot | ||
|
||
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse } | ||
if(Test-Path .\artifacts) { | ||
echo "build: Cleaning .\artifacts" | ||
Remove-Item .\artifacts -Force -Recurse | ||
} | ||
|
||
& dotnet restore --no-cache | ||
|
||
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL]; | ||
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; | ||
$suffix = @{ $true = ""; $false = "$branch-$revision"}[$branch -eq "master" -and $revision -ne "local"] | ||
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"] | ||
|
||
foreach ($src in ls src/Serilog.*) { | ||
echo "build: Version suffix is $suffix" | ||
|
||
foreach ($src in ls src/*) { | ||
Push-Location $src | ||
|
||
& dotnet pack -c Release -o ..\..\.\artifacts --version-suffix=$suffix | ||
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/Serilog.*.Tests) { | ||
foreach ($test in ls test/*.PerformanceTests) { | ||
Push-Location $test | ||
|
||
& dotnet test -c Release | ||
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 | ||
|
||
echo "build: Testing project in $test" | ||
|
||
& dotnet test -c Release | ||
if($LASTEXITCODE -ne 0) { exit 3 } | ||
|
||
Pop-Location | ||
} | ||
|
||
Pop-Location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters