Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

.vs/
project.lock.json

# User-specific files
*.suo
*.user
Expand Down Expand Up @@ -181,3 +184,4 @@ UpgradeLog*.htm

# Microsoft Fakes
FakesAssemblies/

90 changes: 17 additions & 73 deletions Build.ps1
Original file line number Diff line number Diff line change
@@ -1,85 +1,29 @@
param(
[String] $majorMinor = "0.0", # 2.0
[String] $patch = "0", # $env:APPVEYOR_BUILD_VERSION
[String] $customLogger = "", # C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll
[Switch] $notouch,
[String] $sln # e.g serilog-sink-name
)
Push-Location $PSScriptRoot

function Set-AssemblyVersions($informational, $assembly)
{
(Get-Content assets/CommonAssemblyInfo.cs) |
ForEach-Object { $_ -replace """1.0.0.0""", """$assembly""" } |
ForEach-Object { $_ -replace """1.0.0""", """$informational""" } |
ForEach-Object { $_ -replace """1.1.1.1""", """$($informational).0""" } |
Set-Content assets/CommonAssemblyInfo.cs
}

function Install-NuGetPackages($solution)
{
nuget restore $solution
}

function Invoke-MSBuild($solution, $customLogger)
{
if ($customLogger)
{
msbuild "$solution" /verbosity:minimal /p:Configuration=Release /logger:"$customLogger"
}
else
{
msbuild "$solution" /verbosity:minimal /p:Configuration=Release
}
}

function Invoke-NuGetPackProj($csproj)
{
nuget pack -Prop Configuration=Release -Symbols $csproj
}

function Invoke-NuGetPackSpec($nuspec, $version)
{
nuget pack $nuspec -Version $version -OutputDirectory ..\..\
}

function Invoke-NuGetPack($version)
{
ls src/**/*.csproj |
Where-Object { -not ($_.Name -like "*net40*") } |
ForEach-Object { Invoke-NuGetPackProj $_ }
}

function Invoke-Build($majorMinor, $patch, $customLogger, $notouch, $sln)
{
$package="$majorMinor.$patch"
$slnfile = "$sln.sln"
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse }

Write-Output "$sln $package"
& dotnet restore --no-cache

if (-not $notouch)
{
$assembly = "$majorMinor.0.0"
$branch = $(git symbolic-ref --short -q HEAD)
$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
$suffix = @{ $true = ""; $false = "$branch-$revision"}[$branch -eq "master" -and $revision -ne "local"]

Write-Output "Assembly version will be set to $assembly"
Set-AssemblyVersions $package $assembly
}
foreach ($src in ls src/Serilog.*) {
Push-Location $src

Install-NuGetPackages $slnfile

Invoke-MSBuild $slnfile $customLogger
& dotnet pack -c Release -o ..\..\.\artifacts --version-suffix=$suffix
if($LASTEXITCODE -ne 0) { exit 1 }

Invoke-NuGetPack $package
Pop-Location
}

$ErrorActionPreference = "Stop"
foreach ($test in ls test/Serilog.*.Tests) {
Push-Location $test

if (-not $sln)
{
$slnfull = ls *.sln |
Where-Object { -not ($_.Name -like "*net40*") } |
Select -first 1
& dotnet test -c Release
if($LASTEXITCODE -ne 0) { exit 2 }

$sln = $slnfull.BaseName
Pop-Location
}

Invoke-Build $majorMinor $patch $customLogger $notouch $sln
Pop-Location
29 changes: 29 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: '{build}'
skip_tags: true
image: Visual Studio 2015
configuration: Release
install:
- ps: mkdir -Force ".\build\" | Out-Null
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1"
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
- ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121'
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
build_script:
- ps: ./Build.ps1
test: off
artifacts:
- path: artifacts/Serilog.*.nupkg
deploy:
- provider: NuGet
api_key:
secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x
skip_symbols: true
on:
branch: /^(master|dev)$/
- provider: GitHub
auth_token:
secure: ggZTqqV1z0xecDoQbeoy3A7xikShCt9FWZIGp95dG9Fo0p5RAT9oGU0ZekHfUIwk
artifact: /Serilog.*\.nupkg/
tag: v$(appveyor_build_version)
on:
branch: master
5 changes: 0 additions & 5 deletions assets/CommonAssemblyInfo.cs

This file was deleted.

6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-003121"
}
}
20 changes: 13 additions & 7 deletions serilog-sinks-azuretablestorage.sln
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Sinks.AzureTableStorage", "src\Serilog.Sinks.AzureTableStorage\Serilog.Sinks.AzureTableStorage.csproj", "{DA0432BD-FDA0-40C9-BCF1-A38F601600D3}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.AzureTableStorage", "src\Serilog.Sinks.AzureTableStorage\Serilog.Sinks.AzureTableStorage.xproj", "{EDB6E773-0A33-4A88-81BC-3B24ABFEBA61}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.AzureTableStorageWithProperties.Tests", "test\Serilog.Sinks.AzureTableStorageWithProperties.Tests\Serilog.Sinks.AzureTableStorageWithProperties.Tests.xproj", "{2740763E-959A-4AAD-BFC9-5B428393DFDE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DA0432BD-FDA0-40C9-BCF1-A38F601600D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA0432BD-FDA0-40C9-BCF1-A38F601600D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA0432BD-FDA0-40C9-BCF1-A38F601600D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA0432BD-FDA0-40C9-BCF1-A38F601600D3}.Release|Any CPU.Build.0 = Release|Any CPU
{EDB6E773-0A33-4A88-81BC-3B24ABFEBA61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EDB6E773-0A33-4A88-81BC-3B24ABFEBA61}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDB6E773-0A33-4A88-81BC-3B24ABFEBA61}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EDB6E773-0A33-4A88-81BC-3B24ABFEBA61}.Release|Any CPU.Build.0 = Release|Any CPU
{2740763E-959A-4AAD-BFC9-5B428393DFDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2740763E-959A-4AAD-BFC9-5B428393DFDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2740763E-959A-4AAD-BFC9-5B428393DFDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2740763E-959A-4AAD-BFC9-5B428393DFDE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>edb6e773-0a33-4a88-81bc-3b24abfeba61</ProjectGuid>
<RootNamespace>Serilog.Sinks.AzureTableStorage</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
</PropertyGroup>

<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
27 changes: 27 additions & 0 deletions src/Serilog.Sinks.AzureTableStorage/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"version": "2.0.0",
"description": "Serilog event sink that writes to Azure Table Storage over HTTP.",

"authors": [ "Robert Moore" ],
"packOptions": {
"tags": [ "serilog", "logging", "azure" ],
"projectUrl": "http://serilog.net",
"licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0",
"iconUrl": "http://serilog.net/images/serilog-configuration-nuget.png"
},
"dependencies": {
"Serilog": "2.0.0",
"Serilog.Sinks.PeriodicBatching": "2.0.0",
"WindowsAzure.Storage": "4.3.0"
},
"buildOptions": {
"keyFile": "../../assets/Serilog.snk"
},
"frameworks": {
"net4.5": {
"frameworkAssemblies": {
"System.Configuration": ""
}
}
}
}
Loading