Skip to content

Commit fd7ad1b

Browse files
committed
Merge branch 'dev'
2 parents f306b77 + 8b11b85 commit fd7ad1b

File tree

146 files changed

+3693
-2941
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+3693
-2941
lines changed

Build.ps1

Lines changed: 10 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,21 @@
1-
function Install-Dnvm
2-
{
3-
& where.exe dnvm 2>&1 | Out-Null
4-
if(($LASTEXITCODE -ne 0) -Or ((Test-Path Env:\APPVEYOR) -eq $true))
5-
{
6-
Write-Host "DNVM not found"
7-
&{$Branch='dev';iex ((New-Object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}
8-
9-
# Normally this happens automatically during install but AppVeyor has
10-
# an issue where you may need to manually re-run setup from within this process.
11-
if($env:DNX_HOME -eq $NULL)
12-
{
13-
Write-Host "Initial DNVM environment setup failed; running manual setup"
14-
$tempDnvmPath = Join-Path $env:TEMP "dnvminstall"
15-
$dnvmSetupCmdPath = Join-Path $tempDnvmPath "dnvm.ps1"
16-
& $dnvmSetupCmdPath setup
17-
}
18-
}
19-
}
20-
21-
function Get-DnxVersion
22-
{
23-
$globalJson = Join-Path $PSScriptRoot "global.json"
24-
$jsonData = Get-Content -Path $globalJson -Raw | ConvertFrom-JSON
25-
return $jsonData.sdk.version
26-
}
27-
28-
function Restore-Packages
29-
{
30-
param([string] $DirectoryName)
31-
& dnu restore ("""" + $DirectoryName + """")
32-
}
33-
34-
function Build-Projects
35-
{
36-
param([string] $DirectoryName)
37-
& dnu build ("""" + $DirectoryName + """") --configuration Release --out .\artifacts\testbin; if($LASTEXITCODE -ne 0) { exit 1 }
38-
& dnu pack ("""" + $DirectoryName + """") --configuration Release --out .\artifacts\packages; if($LASTEXITCODE -ne 0) { exit 1 }
39-
}
40-
41-
function Build-TestProjects
42-
{
43-
param([string] $DirectoryName)
44-
& dnu build ("""" + $DirectoryName + """") --configuration Release --out .\artifacts\testbin; if($LASTEXITCODE -ne 0) { exit 1 }
45-
}
46-
47-
function Test-Projects
48-
{
49-
param([string] $DirectoryName)
50-
& dnx -p ("""" + $DirectoryName + """") test; if($LASTEXITCODE -ne 0) { exit 2 }
51-
}
52-
53-
function Remove-PathVariable
54-
{
55-
param([string] $VariableToRemove)
56-
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
57-
$newItems = $path.Split(';') | Where-Object { $_.ToString() -inotlike $VariableToRemove }
58-
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "User")
59-
$path = [Environment]::GetEnvironmentVariable("PATH", "Process")
60-
$newItems = $path.Split(';') | Where-Object { $_.ToString() -inotlike $VariableToRemove }
61-
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "Process")
62-
}
63-
641
Push-Location $PSScriptRoot
652

66-
$dnxVersion = Get-DnxVersion
67-
68-
# Clean
693
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse }
704

71-
# Remove the installed DNVM from the path and force use of
72-
# per-user DNVM (which we can upgrade as needed without admin permissions)
73-
Remove-PathVariable "*Program Files\Microsoft DNX\DNVM*"
74-
75-
# Make sure per-user DNVM is installed
76-
Install-Dnvm
77-
78-
# Install DNX
79-
dnvm install $dnxVersion -r CoreCLR -NoNative
80-
dnvm install $dnxVersion -r CLR -NoNative
81-
dnvm use $dnxVersion -r CLR
5+
& dotnet restore
826

83-
# Package restore
84-
Get-ChildItem -Path . -Filter *.xproj -Recurse | ForEach-Object { Restore-Packages $_.DirectoryName }
7+
$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
858

86-
# Set build number
87-
$env:DNX_BUILD_VERSION = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
88-
Write-Host "Build number: " $env:DNX_BUILD_VERSION
9+
Push-Location src/Serilog.Extensions.Logging
8910

90-
# Build/package
91-
Get-ChildItem -Path .\src -Filter *.xproj -Recurse | ForEach-Object { Build-Projects $_.DirectoryName }
92-
Get-ChildItem -Path .\test -Filter *.xproj -Recurse | ForEach-Object { Build-TestProjects $_.DirectoryName }
11+
& dotnet pack -c Release -o ..\..\.\artifacts --version-suffix=$revision
12+
if($LASTEXITCODE -ne 0) { exit 1 }
9313

94-
# Test
95-
Get-ChildItem -Path .\test -Filter *.xproj -Recurse | ForEach-Object { Test-Projects $_.DirectoryName }
96-
97-
# Switch to Core CLR
98-
dnvm use $dnxVersion -r CoreCLR
14+
Pop-Location
15+
Push-Location test/Serilog.Extensions.Logging.Tests
9916

100-
# Test again
101-
Get-ChildItem -Path .\test -Filter *.xproj -Recurse | ForEach-Object { Test-Projects $_.DirectoryName }
17+
& dotnet test -c Release
18+
if($LASTEXITCODE -ne 0) { exit 2 }
10219

10320
Pop-Location
21+
Pop-Location

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![Build status](https://ci.appveyor.com/api/projects/status/865nohxfiq1rnby0/branch/master?svg=true)](https://ci.appveyor.com/project/serilog/serilog-extensions-logging/branch/master) [![NuGet Version](http://img.shields.io/nuget/v/Serilog.Extensions.Logging.svg?style=flat)](https://www.nuget.org/packages/Serilog.Extensions.Logging/)
33

44

5-
A Serilog provider for [Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging), the logging subsystem used by ASP.NET 5.
5+
A Serilog provider for [Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging), the logging subsystem used by ASP.NET Core.
66

77
This package routes ASP.NET log messages through Serilog, so you can get information about ASP.NET's internal operations logged to the same Serilog sinks as your application events.
88

appveyor.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: '{build}'
2+
image: Visual Studio 2015
3+
configuration: Release
4+
install:
5+
- ps: mkdir -Force ".\build\" | Out-Null
6+
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.ps1" -OutFile ".\build\installcli.ps1"
7+
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
8+
- ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath'
9+
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
10+
build_script:
11+
- ps: ./Build.ps1
12+
test: off
13+
artifacts:
14+
- path: artifacts/Serilog.*.nupkg
15+
deploy:
16+
- provider: NuGet
17+
api_key:
18+
secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x
19+
skip_symbols: true
20+
on:
21+
branch: /^(dev|master)$/
22+

assets/Serilog.snk

596 Bytes
Binary file not shown.

global.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"projects": [ "src", "test" ],
3-
"sdk": {
4-
"version": "1.0.0-rc1-final"
5-
}
2+
"projects": [ "src", "test" ],
3+
"sdk": {
4+
"version": "1.0.0-preview1-002702"
5+
}
66
}

samples/MvcSample/Views/Shared/Error.cshtml

Lines changed: 0 additions & 6 deletions
This file was deleted.

samples/MvcSample/Views/Shared/_Layout.cshtml

Lines changed: 0 additions & 68 deletions
This file was deleted.

samples/MvcSample/Views/_ViewImports.cshtml

Lines changed: 0 additions & 6 deletions
This file was deleted.

samples/MvcSample/appsettings.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

samples/MvcSample/bower.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)