-
Notifications
You must be signed in to change notification settings - Fork 47
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 #24 from serilog/dev
Release 2.0
- Loading branch information
Showing
40 changed files
with
625 additions
and
835 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
language: csharp | ||
|
||
#dotnet cli require Ubuntu 14.04 | ||
sudo: required | ||
dist: trusty | ||
|
||
#dotnet cli require OSX 10.10 | ||
osx_image: xcode7.1 | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- gettext | ||
- libcurl4-openssl-dev | ||
- libicu-dev | ||
- libssl-dev | ||
- libunwind8 | ||
- zlib1g | ||
|
||
os: | ||
- osx | ||
- linux | ||
|
||
env: | ||
matrix: | ||
- CLI_VERSION=1.0.0-preview2-003121 | ||
- CLI_VERSION=Latest | ||
|
||
matrix: | ||
allow_failures: | ||
- env: CLI_VERSION=Latest | ||
|
||
before_install: | ||
- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; brew link --force openssl; fi | ||
# Download script to install dotnet cli | ||
- if test "$CLI_OBTAIN_URL" == ""; then export CLI_OBTAIN_URL="https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.sh"; fi | ||
- curl -L --create-dirs $CLI_OBTAIN_URL -o ./scripts/obtain/install.sh | ||
- find ./scripts -name "*.sh" -exec chmod +x {} \; | ||
- export DOTNET_INSTALL_DIR="$PWD/.dotnetcli" | ||
# use bash to workaround bug https://github.com/dotnet/cli/issues/1725 | ||
- sudo bash ./scripts/obtain/install.sh --channel "preview" --version "$CLI_VERSION" --install-dir "$DOTNET_INSTALL_DIR" --no-path | ||
# add dotnet to PATH | ||
- export PATH="$DOTNET_INSTALL_DIR:$PATH" | ||
|
||
script: | ||
- ./build.sh |
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,73 +1,16 @@ | ||
param( | ||
[String] $majorMinor = "1.8", # 2.0 | ||
[String] $patch = "0", # $env:APPVEYOR_BUILD_VERSION | ||
[String] $customLogger = "", # C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll | ||
[Switch] $notouch | ||
) | ||
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 | ||
} | ||
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse } | ||
|
||
function Install-NuGetPackages() | ||
{ | ||
nuget restore serilog-sinks-splunk.sln | ||
} | ||
& dotnet restore | ||
|
||
function Invoke-MSBuild($solution, $customLogger) | ||
{ | ||
if ($customLogger) | ||
{ | ||
msbuild "$solution" /verbosity:minimal /p:Configuration=Release /logger:"$customLogger" | ||
} | ||
else | ||
{ | ||
msbuild "$solution" /verbosity:minimal /p:Configuration=Release | ||
} | ||
} | ||
$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; | ||
|
||
function Invoke-NuGetPackProj($csproj) | ||
{ | ||
nuget pack -Prop Configuration=Release -Symbols $csproj | ||
} | ||
Push-Location src/Serilog.Sinks.Splunk | ||
|
||
function Invoke-NuGetPackSpec($nuspec, $version) | ||
{ | ||
nuget pack $nuspec -Version $version -OutputDirectory ..\..\ | ||
} | ||
& dotnet pack -c Release -o ..\..\.\artifacts --version-suffix=$revision | ||
if($LASTEXITCODE -ne 0) { exit 1 } | ||
|
||
function Invoke-NuGetPack($version) | ||
{ | ||
pushd .\src\Serilog.Sinks.Splunk | ||
Invoke-NuGetPackSpec "Serilog.Sinks.Splunk.nuspec" $version | ||
popd | ||
} | ||
|
||
function Invoke-Build($majorMinor, $patch, $customLogger, $notouch) | ||
{ | ||
$package="$majorMinor.$patch" | ||
|
||
Write-Output "Building Serilog.Sinks.Splunk $package" | ||
|
||
if (-not $notouch) | ||
{ | ||
$assembly = "$majorMinor.0.0" | ||
|
||
Write-Output "Assembly version will be set to $assembly" | ||
Set-AssemblyVersions $package $assembly | ||
} | ||
|
||
Install-NuGetPackages | ||
|
||
Invoke-MSBuild "serilog-sinks-splunk.sln" $customLogger | ||
|
||
Invoke-NuGetPack $package | ||
} | ||
|
||
$ErrorActionPreference = "Stop" | ||
Invoke-Build $majorMinor $patch $customLogger $notouch | ||
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
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 | ||
- provider: GitHub | ||
auth_token: | ||
secure: ggZTqqV1z0xecDoQbeoy3A7xikShCt9FWZIGp95dG9Fo0p5RAT9oGU0ZekHfUIwk | ||
artifact: /Serilog.*\.nupkg/ | ||
tag: v$(appveyor_build_version) | ||
on: | ||
branch: master |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
dotnet restore | ||
for path in src/*/project.json; do | ||
dirname="$(dirname "${path}")" | ||
dotnet build ${dirname} | ||
done | ||
|
||
for path in sample/project.json; do | ||
dirname="$(dirname "${path}")" | ||
dotnet build ${dirname} | ||
done |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"projects": [ "src", "test" ], | ||
"sdk": { | ||
"version": "1.0.0-preview1-002702" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
sh build.sh | ||
|
||
cd sample | ||
dotnet run 15 | ||
cd .. |
Oops, something went wrong.