Skip to content

Commit

Permalink
Merge pull request #192 from serilog-contrib/dev
Browse files Browse the repository at this point in the history
4.0.0 Release
  • Loading branch information
nblumhardt authored Jun 21, 2022
2 parents a5a6b2c + 1432667 commit 5e00be6
Show file tree
Hide file tree
Showing 42 changed files with 1,273 additions and 1,032 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Report a bug and help us to improve Serilog.Sinks.ApplicationInsights
title: ''
labels: bug
assignees: ''

---

The maintainers want you to have a great experience using Serilog.Sinks.ApplicationInsights, and will happily track down and resolve bugs. We all have limited time, though, so please think through all of the factors that might be involved and include as much useful information as possible 😊.

👉 Please ensure that this is the most appropriate repository for your bug report. Only reports for bugs directly caused by code in this specific repository can be accepted.

**Description**
What's going wrong?

**Reproduction**
Please provide code samples showing how you're configuring and calling the sink and Serilog to produce the behavior.

**Expected behavior**
A concise description of what you expected to happen.

**Relevant package, tooling and runtime versions**
What package version are you using, on what platform?

**Additional context**
Add any other context about the problem here.
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contact_links:
- name: Ask for help
url: https://stackoverflow.com/questions/tagged/serilog
about: Ask the community for help with using Serilog and this sink
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an improvement to Serilog.Sinks.ApplicationInsights
title: ''
labels: enhancement
assignees: ''

---

**Describe your suggestion**
A clear and concise description of what you want to happen. Please include enough information about your reasoning and expected benefits: feature suggestions need to go into _why_ the feature is needed.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build

on: [push, pull_request]

jobs:
build:
name: Build
runs-on: windows-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Invoke Build.ps1 with PowerShell Core
shell: pwsh
run: ./Build.ps1
- name: Push
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
shell: pwsh
run: |
dotnet nuget push (get-item ./artifacts/*.nupkg).FullName --api-key="$env:NUGET_API_KEY" -s https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,4 @@ UpgradeLog*.htm

# Microsoft Fakes
FakesAssemblies/
/.idea
46 changes: 23 additions & 23 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@ echo "build: Build started"

Push-Location $PSScriptRoot

if(Test-Path .\artifacts) {
echo "build: Cleaning .\artifacts"
Remove-Item .\artifacts -Force -Recurse
if (Test-Path ./artifacts) {
echo "build: Cleaning ./artifacts"
Remove-Item ./artifacts -Force -Recurse
}

echo "build: Restoring"
& dotnet restore --no-cache
if($LASTEXITCODE -ne 0) { exit 1 }

$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 ""]
$projectName = "Serilog.Sinks.ApplicationInsights"
$ref = $env:GITHUB_REF ?? ""
$run = $env:GITHUB_RUN_NUMBER ?? "0"
$branch = @{ $true = $ref.Substring($ref.LastIndexOf("/") + 1); $false = $(git symbolic-ref --short -q HEAD) }[$ref -ne ""];
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $run, 10); $false = "local" }[$run -ne "0"];
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "main" -and $revision -ne "local"]

echo "build: Package version suffix is $suffix"
echo "build: Build version suffix is $buildSuffix"
echo "build: Version suffix is $suffix"

foreach ($src in ls src/*) {
Push-Location $src
& dotnet test -c Release "./test/$projectName.Tests/$projectName.Tests.csproj"
if ($LASTEXITCODE -ne 0) { throw "dotnet test failed" }

echo "build: Packaging project in $src"
$src = "./src/$projectName"

& dotnet build -c Release --version-suffix=$buildSuffix
& dotnet build -c Release --version-suffix=$suffix "$src/$projectName.csproj"
if ($LASTEXITCODE -ne 0) { throw "dotnet build failed" }

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

Pop-Location
if ($suffix) {
& dotnet pack -c Release -o ./artifacts --no-build --version-suffix=$suffix "$src/$projectName.csproj"
} else {
& dotnet pack -c Release -o ./artifacts --no-build "$src/$projectName.csproj"
}
if ($LASTEXITCODE -ne 0) { throw "dotnet pack failed" }

Pop-Location
Pop-Location
2 changes: 0 additions & 2 deletions CHANGES.md

This file was deleted.

Loading

0 comments on commit 5e00be6

Please sign in to comment.