Skip to content

Commit b9672e8

Browse files
committed
Added assets
1 parent de08dc2 commit b9672e8

15 files changed

+703
-0
lines changed

.editorconfig

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root=true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Auto detect text files and perform LF normalization
2+
3+
* text=auto

Build.ps1

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
$root = $(Get-Item $($MyInvocation.MyCommand.Path)).DirectoryName
2+
3+
function Install-Dnvm
4+
{
5+
& where.exe dnvm 2>&1 | Out-Null
6+
if(($LASTEXITCODE -ne 0) -Or ((Test-Path Env:\APPVEYOR) -eq $true))
7+
{
8+
Write-Host "DNVM not found"
9+
&{$Branch='dev';iex ((New-Object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}
10+
11+
# Normally this happens automatically during install but AppVeyor has
12+
# an issue where you may need to manually re-run setup from within this process.
13+
if($env:DNX_HOME -eq $NULL)
14+
{
15+
Write-Host "Initial DNVM environment setup failed; running manual setup"
16+
$tempDnvmPath = Join-Path $env:TEMP "dnvminstall"
17+
$dnvmSetupCmdPath = Join-Path $tempDnvmPath "dnvm.ps1"
18+
& $dnvmSetupCmdPath setup
19+
}
20+
}
21+
}
22+
23+
function Get-DnxVersion
24+
{
25+
$globalJson = Join-Path $PSScriptRoot "global.json"
26+
$jsonData = Get-Content -Path $globalJson -Raw | ConvertFrom-JSON
27+
return $jsonData.sdk.version
28+
}
29+
30+
function Restore-Packages
31+
{
32+
param([string] $DirectoryName)
33+
& dnu restore ("""" + $DirectoryName + """")
34+
}
35+
36+
function Build-Projects
37+
{
38+
param($Directory, $pack)
39+
40+
$DirectoryName = $Directory.DirectoryName
41+
$artifactsFolder = join-path $root "artifacts"
42+
$projectsFolder = join-path $artifactsFolder $Directory.Name
43+
$buildFolder = join-path $projectsFolder "testbin"
44+
$packageFolder = join-path $projectsFolder "packages"
45+
46+
& dnu build ("""" + $DirectoryName + """") --configuration Release --out $buildFolder; if($LASTEXITCODE -ne 0) { exit 1 }
47+
48+
if($pack){
49+
& dnu pack ("""" + $DirectoryName + """") --configuration Release --out $packageFolder; if($LASTEXITCODE -ne 0) { exit 1 }
50+
}
51+
}
52+
53+
function Test-Projects
54+
{
55+
param([string] $DirectoryName)
56+
& dnx -p ("""" + $DirectoryName + """") test; if($LASTEXITCODE -ne 0) { exit 2 }
57+
}
58+
59+
function Remove-PathVariable
60+
{
61+
param([string] $VariableToRemove)
62+
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
63+
$newItems = $path.Split(';') | Where-Object { $_.ToString() -inotlike $VariableToRemove }
64+
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "User")
65+
$path = [Environment]::GetEnvironmentVariable("PATH", "Process")
66+
$newItems = $path.Split(';') | Where-Object { $_.ToString() -inotlike $VariableToRemove }
67+
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "Process")
68+
}
69+
70+
Push-Location $PSScriptRoot
71+
72+
$dnxVersion = Get-DnxVersion
73+
74+
# Clean
75+
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse }
76+
77+
# Remove the installed DNVM from the path and force use of
78+
# per-user DNVM (which we can upgrade as needed without admin permissions)
79+
Remove-PathVariable "*Program Files\Microsoft DNX\DNVM*"
80+
81+
# Make sure per-user DNVM is installed
82+
Install-Dnvm
83+
84+
# Install DNX
85+
dnvm install $dnxVersion -r CoreCLR -NoNative
86+
dnvm install $dnxVersion -r CLR -NoNative
87+
dnvm use $dnxVersion -r CLR
88+
89+
# Package restore
90+
Get-ChildItem -Path . -Filter *.xproj -Recurse | ForEach-Object { Restore-Packages $_.DirectoryName }
91+
92+
# Set build number
93+
$env:DNX_BUILD_VERSION = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
94+
Write-Host "Build number: " $env:DNX_BUILD_VERSION
95+
96+
# Build/package
97+
Get-ChildItem -Path .\src -Filter *.xproj -Recurse | ForEach-Object { Build-Projects $_ $true }
98+
Get-ChildItem -Path .\test -Filter *.xproj -Recurse | ForEach-Object { Build-Projects $_ $false }
99+
100+
# Test
101+
Get-ChildItem -Path .\test -Filter *.xproj -Recurse | ForEach-Object { Test-Projects $_.DirectoryName }
102+
103+
# Switch to Core CLR
104+
dnvm use $dnxVersion -r CoreCLR
105+
106+
# Test again
107+
Get-ChildItem -Path .\test -Filter *.xproj -Recurse | ForEach-Object { Test-Projects $_.DirectoryName }
108+
109+
Pop-Location

CHANGES.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2.0.0
2+
- Moved to new project
3+
- DotNet Core support

Serilog.Sinks.File.sln

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.24720.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{037440DE-440B-4129-9F7A-09B42D00397E}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5E1-DEB9-4A04-8BAB-24EC7240ADAF}"
9+
ProjectSection(SolutionItems) = preProject
10+
Build.ps1 = Build.ps1
11+
global.json = global.json
12+
NuGet.Config = NuGet.Config
13+
README.md = README.md
14+
assets\Serilog.snk = assets\Serilog.snk
15+
EndProjectSection
16+
EndProject
17+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.File", "src\Serilog.Sinks.File\Serilog.Sinks.File.xproj", "{57E0ED0E-0F45-48AB-A73D-6A92B7C32095}"
18+
EndProject
19+
Global
20+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
21+
Debug|Any CPU = Debug|Any CPU
22+
Release|Any CPU = Release|Any CPU
23+
EndGlobalSection
24+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
25+
{57E0ED0E-0F45-48AB-A73D-6A92B7C32095}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26+
{57E0ED0E-0F45-48AB-A73D-6A92B7C32095}.Debug|Any CPU.Build.0 = Debug|Any CPU
27+
{57E0ED0E-0F45-48AB-A73D-6A92B7C32095}.Release|Any CPU.ActiveCfg = Release|Any CPU
28+
{57E0ED0E-0F45-48AB-A73D-6A92B7C32095}.Release|Any CPU.Build.0 = Release|Any CPU
29+
EndGlobalSection
30+
GlobalSection(SolutionProperties) = preSolution
31+
HideSolutionNode = FALSE
32+
EndGlobalSection
33+
GlobalSection(NestedProjects) = preSolution
34+
{57E0ED0E-0F45-48AB-A73D-6A92B7C32095} = {037440DE-440B-4129-9F7A-09B42D00397E}
35+
EndGlobalSection
36+
EndGlobal

assets/Serilog.snk

596 Bytes
Binary file not shown.

assets/Serilog.svg

+189
Loading

global.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"projects": [ "src", "test" ],
3+
"sdk": {
4+
"version": "1.0.0-rc1-final"
5+
}
6+
}

0 commit comments

Comments
 (0)