-
Notifications
You must be signed in to change notification settings - Fork 20
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 #12 from Authenticom/master
.NET standard 2 support
- Loading branch information
Showing
11 changed files
with
101 additions
and
206 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,3 +181,4 @@ UpgradeLog*.htm | |
|
||
# Microsoft Fakes | ||
FakesAssemblies/ | ||
.vs/ |
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,85 +1,48 @@ | ||
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 | ||
) | ||
echo "build: Build started" | ||
|
||
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 | ||
} | ||
Push-Location $PSScriptRoot | ||
|
||
function Install-NuGetPackages($solution) | ||
{ | ||
nuget restore $solution | ||
if(Test-Path .\artifacts) { | ||
echo "build: Cleaning .\artifacts" | ||
Remove-Item .\artifacts -Force -Recurse | ||
} | ||
|
||
function Invoke-MSBuild($solution, $customLogger) | ||
{ | ||
if ($customLogger) | ||
{ | ||
msbuild "$solution" /verbosity:minimal /p:Configuration=Release /logger:"$customLogger" | ||
} | ||
else | ||
{ | ||
msbuild "$solution" /verbosity:minimal /p:Configuration=Release | ||
} | ||
} | ||
& dotnet restore --no-cache | ||
|
||
function Invoke-NuGetPackProj($csproj) | ||
{ | ||
nuget pack -Prop Configuration=Release -Symbols $csproj | ||
} | ||
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL]; | ||
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL]; | ||
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"] | ||
$commitHash = $(git rev-parse --short HEAD) | ||
$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""] | ||
|
||
function Invoke-NuGetPackSpec($nuspec, $version) | ||
{ | ||
nuget pack $nuspec -Version $version -OutputDirectory ..\..\ | ||
} | ||
echo "build: Package version suffix is $suffix" | ||
echo "build: Build version suffix is $buildSuffix" | ||
|
||
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" | ||
|
||
Write-Output "$sln $package" | ||
foreach ($src in ls src/*) { | ||
Push-Location $src | ||
|
||
if (-not $notouch) | ||
{ | ||
$assembly = "$majorMinor.0.0" | ||
echo "build: Packaging project in $src" | ||
|
||
Write-Output "Assembly version will be set to $assembly" | ||
Set-AssemblyVersions $package $assembly | ||
& dotnet build -c Release --version-suffix=$buildSuffix | ||
if ($suffix) { | ||
& dotnet pack -c Release --include-source -o ..\..\artifacts --version-suffix=$suffix --no-build | ||
} else { | ||
& dotnet pack -c Release --include-source -o ..\..\artifacts --no-build | ||
} | ||
if($LASTEXITCODE -ne 0) { exit 1 } | ||
|
||
Install-NuGetPackages $slnfile | ||
|
||
Invoke-MSBuild $slnfile $customLogger | ||
|
||
Invoke-NuGetPack $package | ||
Pop-Location | ||
} | ||
|
||
$ErrorActionPreference = "Stop" | ||
foreach ($test in ls test/*.Tests) { | ||
Push-Location $test | ||
|
||
echo "build: Testing project in $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 3 } | ||
|
||
$sln = $slnfull.BaseName | ||
Pop-Location | ||
} | ||
|
||
Invoke-Build $majorMinor $patch $customLogger $notouch $sln | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
version: '{build}' | ||
skip_tags: true | ||
image: Visual Studio 2017 | ||
configuration: Release | ||
install: | ||
- ps: mkdir -Force ".\build\" | Out-Null | ||
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: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX | ||
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
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 |
---|---|---|
@@ -1,84 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{B4EEC1AD-6E2B-49F6-A4C0-A9D39E9C4EFA}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Serilog</RootNamespace> | ||
<AssemblyName>Serilog.Sinks.Raygun</AssemblyName> | ||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir> | ||
<RestorePackages>true</RestorePackages> | ||
<TargetFrameworkProfile /> | ||
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
<Authors>Michiel van Oudheusden</Authors> | ||
<Company>Serilog</Company> | ||
<Product>Serilog.Sinks.Raygun</Product> | ||
<Description>Send log events to custom topics in Azure Event Grid</Description> | ||
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl> | ||
<PackageProjectUrl>http://serilog.net</PackageProjectUrl> | ||
<PackageIconUrl>http://serilog.net/images/serilog-sink-nuget.png</PackageIconUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<RepositoryUrl>https://github.com/serilog/serilog-sinks-raygun</RepositoryUrl> | ||
<PackageTags>serilog sink raygun</PackageTags> | ||
<Copyright>Copyright © Serilog Contributors 2017</Copyright> | ||
<Description>Serilog event sink that writes to the Raygun.io service.</Description> | ||
<Version>3.0.0</Version> | ||
<AssemblyVersion>3.0.0.0</AssemblyVersion> | ||
<FileVersion>3.0.0.0</FileVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<DocumentationFile>bin\Debug\Serilog.Sinks.Raygun.xml</DocumentationFile> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<DocumentationFile>bin\Release\Serilog.Sinks.Raygun.xml</DocumentationFile> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<SignAssembly>true</SignAssembly> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<AssemblyOriginatorKeyFile>..\..\assets\Serilog.snk</AssemblyOriginatorKeyFile> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Mindscape.Raygun4Net, Version=5.4.1.0, Culture=neutral, PublicKeyToken=20dddfb3684a7aa5, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\Mindscape.Raygun4Net.Signed.5.4.1\lib\net40\Mindscape.Raygun4Net.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Mindscape.Raygun4Net4, Version=5.4.1.0, Culture=neutral, PublicKeyToken=002e1b57394fa9b9, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\Mindscape.Raygun4Net.Signed.5.4.1\lib\net40\Mindscape.Raygun4Net4.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\Serilog.2.3.0\lib\net46\Serilog.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Web" /> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net461'"> | ||
<PackageReference Include="Mindscape.Raygun4Net" Version="5.5.2" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="LoggerConfigurationRaygunExtensions.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="..\..\assets\CommonAssemblyInfo.cs"> | ||
<Link>Properties\CommonAssemblyInfo.cs</Link> | ||
</Compile> | ||
<Compile Include="Sinks\Raygun\RaygunPropertyFormatter.cs" /> | ||
<Compile Include="Sinks\Raygun\RaygunSink.cs" /> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
<PackageReference Include="mindscape.Raygun4Net.AspNetCore" Version="5.5.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
<None Include="Serilog.Sinks.Raygun.nuspec"> | ||
<SubType>Designer</SubType> | ||
</None> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Serilog" Version="2.6.0" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> | ||
|
||
</Project> |
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
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.
Empty file.