Skip to content

Commit

Permalink
chore: build using dotnet cli 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FantasticFiasco committed Aug 19, 2017
1 parent f06a159 commit 68d50a5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
19 changes: 15 additions & 4 deletions Build.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
$logo = (Invoke-WebRequest "https://raw.githubusercontent.com/FantasticFiasco/logo/master/logo.raw").toString();
Write-Host "$logo" -ForegroundColor Green

Write-Host "build: Build started"
Write-Host "build: dotnet cli v$(dotnet --version)"

Push-Location $PSScriptRoot

if (Test-Path .\artifacts) {
Expand All @@ -16,20 +19,28 @@ if ($branch -like "*/*") { $branch = $branch.Substring($branch.LastIndexOf("/")
$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-$revision"}[$branch -eq "master" -and $revision -ne "local"]

Write-Host "build: Version suffix is $suffix"
Write-Host "build: Version suffix is '$suffix'"

foreach ($src in ls src/*) {
foreach ($src in Get-ChildItem src/*) {
Push-Location $src

Write-Host "build: Packaging project in $src"

& dotnet pack -c Release -o ..\..\.\artifacts --version-suffix=$suffix
if ($suffix -eq "")
{
& dotnet build -c Release
& dotnet pack -c Release --include-symbols -o ..\..\artifacts --no-build
}
else {
& dotnet build -c Release --version-suffix=$suffix
& dotnet pack -c Release --include-symbols -o ..\..\artifacts --version-suffix=$suffix --no-build
}
if ($LASTEXITCODE -ne 0) { exit 1 }

Pop-Location
}

foreach ($test in ls test/*Tests) {
foreach ($test in Get-ChildItem test/*Tests) {
Push-Location $test

Write-Host "build: Testing project in $test"
Expand Down
9 changes: 1 addition & 8 deletions src/Serilog.Sinks.Http/Serilog.Sinks.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Authors>Mattias Kindborg</Authors>
<Company />
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<TreatSpecificWarningsAsErrors />
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
Expand All @@ -20,8 +20,6 @@
<PackageProjectUrl>https://github.com/FantasticFiasco/serilog-sinks-http</PackageProjectUrl>
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
<PackageReleaseNotes>For release notes, please see the change log on GitHub.</PackageReleaseNotes>
<!-- Don't reference the full NETStandard.Library -->
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
</PropertyGroup>

<ItemGroup>
Expand All @@ -36,11 +34,6 @@
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="System.Net.Http" Version="4.3.1" />
<PackageReference Include="System.Threading.Timer" Version="4.3.0" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
<DefineConstants>$(DefineConstants);HRESULTS</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal class HttpLogShipper : IDisposable
{
private static readonly TimeSpan RequiredLevelCheckInterval = TimeSpan.FromMinutes(2);
private static readonly string ContentType = "application/json";
private static Regex BufferPathFormatRegex = new Regex(
private static readonly Regex BufferPathFormatRegex = new Regex(
$"(?<prefix>.+)(?:{string.Join("|", Enum.GetNames(typeof(DateFormats)).Select(x => $"{{{x}}}"))})(?<postfix>.+)");

private readonly string requestUri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageReference Include="Shouldly" Version="2.8.2" />
<PackageReference Include="xunit" Version="2.2.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
<PackageReference Include="Moq" Version="4.7.8" />
<PackageReference Include="Moq" Version="4.7.99" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 68d50a5

Please sign in to comment.