Skip to content

Commit 7b5090c

Browse files
committed
Merge pull request #13 from merbla/dev
.NET Core RC2 Update
2 parents e4ab4ae + 87b2e5c commit 7b5090c

File tree

10 files changed

+1176
-2924
lines changed

10 files changed

+1176
-2924
lines changed

.gitignore

Lines changed: 63 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,36 @@
11
## Ignore Visual Studio temporary files, build results, and
22
## files generated by popular Visual Studio add-ons.
33

4-
.vs/
5-
64
# User-specific files
75
*.suo
86
*.user
7+
*.userosscache
98
*.sln.docstates
109

10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
12+
1113
# Build results
1214
[Dd]ebug/
1315
[Dd]ebugPublic/
1416
[Rr]elease/
1517
[Rr]eleases/
1618
x64/
1719
x86/
18-
build/
1920
bld/
2021
[Bb]in/
2122
[Oo]bj/
2223

23-
# Roslyn cache directories
24-
*.ide/
24+
# Visual Studio 2015 cache/options directory
25+
.vs/
26+
# Uncomment if you have tasks that create the project's static files in wwwroot
27+
#wwwroot/
2528

2629
# MSTest test Results
2730
[Tt]est[Rr]esult*/
2831
[Bb]uild[Ll]og.*
2932

30-
#NUNIT
33+
# NUNIT
3134
*.VisualState.xml
3235
TestResult.xml
3336

@@ -36,6 +39,10 @@ TestResult.xml
3639
[Rr]eleasePS/
3740
dlldata.c
3841

42+
# DNX
43+
project.lock.json
44+
artifacts/
45+
3946
*_i.c
4047
*_p.c
4148
*_i.h
@@ -68,6 +75,7 @@ _Chutzpah*
6875
ipch/
6976
*.aps
7077
*.ncb
78+
*.opendb
7179
*.opensdf
7280
*.sdf
7381
*.cachefile
@@ -76,6 +84,7 @@ ipch/
7684
*.psess
7785
*.vsp
7886
*.vspx
87+
*.sap
7988

8089
# TFS 2012 Local Workspace
8190
$tf/
@@ -88,7 +97,7 @@ _ReSharper*/
8897
*.[Rr]e[Ss]harper
8998
*.DotSettings.user
9099

91-
# JustCode is a .NET coding addin-in
100+
# JustCode is a .NET coding add-in
92101
.JustCode
93102

94103
# TeamCity is a build add-in
@@ -100,6 +109,7 @@ _TeamCity*
100109
# NCrunch
101110
_NCrunch_*
102111
.*crunch*.local.xml
112+
nCrunchTemp_*
103113

104114
# MightyMoose
105115
*.mm.*
@@ -138,28 +148,43 @@ publish/
138148
**/packages/*
139149
# except build/, which is used as an MSBuild target.
140150
!**/packages/build/
141-
# If using the old MSBuild-Integrated Package Restore, uncomment this:
151+
# Uncomment if necessary however generally it will be regenerated when needed
142152
#!**/packages/repositories.config
153+
# NuGet v3's project.json files produces more ignoreable files
154+
*.nuget.props
155+
*.nuget.targets
143156

144-
# Windows Azure Build Output
157+
# Microsoft Azure Build Output
145158
csx/
146159
*.build.csdef
147160

161+
# Microsoft Azure Emulator
162+
ecf/
163+
rcf/
164+
165+
# Microsoft Azure ApplicationInsights config file
166+
ApplicationInsights.config
167+
148168
# Windows Store app package directory
149169
AppPackages/
170+
BundleArtifacts/
171+
172+
# Visual Studio cache files
173+
# files ending in .cache can be ignored
174+
*.[Cc]ache
175+
# but keep track of directories ending in .cache
176+
!*.[Cc]ache/
150177

151178
# Others
152-
sql/
153-
*.Cache
154179
ClientBin/
155-
[Ss]tyle[Cc]op.*
156180
~$*
157181
*~
158182
*.dbmdl
159183
*.dbproj.schemaview
160184
*.pfx
161185
*.publishsettings
162186
node_modules/
187+
orleans.codegen.cs
163188

164189
# RIA/Silverlight projects
165190
Generated_Code/
@@ -183,3 +208,29 @@ UpgradeLog*.htm
183208

184209
# Microsoft Fakes
185210
FakesAssemblies/
211+
212+
# GhostDoc plugin setting file
213+
*.GhostDoc.xml
214+
215+
# Node.js Tools for Visual Studio
216+
.ntvs_analysis.dat
217+
218+
# Visual Studio 6 build log
219+
*.plg
220+
221+
# Visual Studio 6 workspace options file
222+
*.opt
223+
224+
# Visual Studio LightSwitch build output
225+
**/*.HTMLClient/GeneratedArtifacts
226+
**/*.DesktopClient/GeneratedArtifacts
227+
**/*.DesktopClient/ModelManifest.xml
228+
**/*.Server/GeneratedArtifacts
229+
**/*.Server/ModelManifest.xml
230+
_Pvt_Extensions
231+
232+
# Paket dependency manager
233+
.paket/paket.exe
234+
235+
# FAKE - F# Make
236+
.fake/

Build.ps1

Lines changed: 6 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,15 @@
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-
701
Push-Location $PSScriptRoot
712

72-
$dnxVersion = Get-DnxVersion
73-
74-
# Clean
753
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse }
764

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 }
5+
& dotnet restore
996

100-
# Test
101-
Get-ChildItem -Path .\test -Filter *.xproj -Recurse | ForEach-Object { Test-Projects $_.DirectoryName }
7+
$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
1028

103-
# Switch to Core CLR
104-
dnvm use $dnxVersion -r CoreCLR
9+
Push-Location src/Serilog.Sinks.Splunk
10510

106-
# Test again
107-
Get-ChildItem -Path .\test -Filter *.xproj -Recurse | ForEach-Object { Test-Projects $_.DirectoryName }
11+
& dotnet pack -c Release -o ..\..\.\artifacts --version-suffix=$revision
12+
if($LASTEXITCODE -ne 0) { exit 1 }
10813

10914
Pop-Location
15+
Pop-Location

appveyor.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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)$/

src/Serilog.Sinks.Splunk/Serilog.Sinks.Splunk.xproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
<PropertyGroup>
1515
<SchemaVersion>2.0</SchemaVersion>
1616
</PropertyGroup>
17-
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
17+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
1818
</Project>

src/Serilog.Sinks.Splunk/Sinks/Splunk/EventCollectorSink.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class EventCollectorSink : ILogEventSink, IDisposable
4343
private readonly SplunkJsonFormatter _jsonFormatter;
4444
private readonly ConcurrentQueue<LogEvent> _queue;
4545
private readonly EventCollectorClient _httpClient;
46-
private readonly PortableTimer _timer;
4746

4847
/// <summary>
4948
/// Taken from Splunk.Logging.Common

0 commit comments

Comments
 (0)