From 6b2a4fdd89367357fce2414b3b606a7ffd6f1f3d Mon Sep 17 00:00:00 2001 From: dosymep Date: Tue, 14 May 2024 11:38:36 +0300 Subject: [PATCH 1/7] update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index bdbf9fe..b0bcf46 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # Serilog.Enrichers.Autodesk.Revit +[![JetBrains Rider](https://img.shields.io/badge/JetBrains-Rider-blue.svg)](https://www.jetbrains.com/rider) +[![License MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE.md) +[![Revit 2017-2025](https://img.shields.io/badge/Revit-2017--2025-blue.svg)](https://www.autodesk.com/products/revit/overview) +[![main](https://github.com/dosymep/Serilog.Enrichers.Autodesk.Revit/actions/workflows/main.yml/badge.svg)](https://github.com/dosymep/Serilog.Enrichers.Autodesk.Revit/actions/workflows/main.yml) + + The Autodesk Revit enrichers for [Serilog](https://serilog.net). ### Getting started From 7e6136ba6054a95d1556ec820acbb527167bd66b Mon Sep 17 00:00:00 2001 From: dosymep Date: Tue, 14 May 2024 11:38:54 +0300 Subject: [PATCH 2/7] update year --- LICENSE.md | 2 +- .../Serilog.Enrichers.Autodesk.Revit.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 0a9bf81..be3736b 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Biseuv Olzhas (dosymep) +Copyright (c) 2024 Biseuv Olzhas (dosymep) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/Serilog.Enrichers.Autodesk.Revit/Serilog.Enrichers.Autodesk.Revit.csproj b/src/Serilog.Enrichers.Autodesk.Revit/Serilog.Enrichers.Autodesk.Revit.csproj index 6e59496..4ee3820 100644 --- a/src/Serilog.Enrichers.Autodesk.Revit/Serilog.Enrichers.Autodesk.Revit.csproj +++ b/src/Serilog.Enrichers.Autodesk.Revit/Serilog.Enrichers.Autodesk.Revit.csproj @@ -11,7 +11,7 @@ x64 autodesk-revit.png dosymep - Copyright (c) 2023 Biseuv Olzhas (dosymep) + Copyright (c) 2024 Biseuv Olzhas (dosymep) https://github.com/dosymep/Serilog.Enrichers.Autodesk.Revit https://github.com/dosymep/Serilog.Enrichers.Autodesk.Revit.git Git From a2cea69e86bd7217abd8ad050c440c71dfab46d3 Mon Sep 17 00:00:00 2001 From: dosymep Date: Tue, 14 May 2024 11:40:09 +0300 Subject: [PATCH 3/7] add ci workflow file --- .github/workflows/main.yml | 96 +++++++++++++++++++ .../Serilog.Enrichers.Autodesk.Revit.csproj | 2 + 2 files changed, 98 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b7041d5 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,96 @@ +name: main + +permissions: + packages: write + contents: write + actions: read + checks: write + +on: + # on pull_request to master + pull_request: + types: [ opened, synchronize ] + branches: [ main, master ] + + # manual + workflow_dispatch: + +env: + output: bin + project: Serilog.Enrichers.Autodesk.Revit + configuration: Release + default_branch: ${{ github.event.repository.default_branch }} + +jobs: + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + # Install the .NET Core workload + - name: Install .NET 8.0 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + # Build project: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-build + - name: Build + run: dotnet build -c ${{ env.configuration }} + + # Test project: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-test + - name: Test + run: dotnet test -c ${{ env.configuration }} --logger trx --results-directory "TestResults" + + # Upload tests results: https://github.com/dorny/test-reporter + - name: Upload tests results + uses: dorny/test-reporter@v1 + if: success() || failure() + with: + name: dotnet tests + path: ./TestResults/*.trx + reporter: dotnet-trx + + - name: Pack + run: dotnet pack -c ${{ env.configuration }} -o ${{ env.output }} + + # Fetch version: https://github.com/kzrnm/get-net-sdk-project-versions-action + - name: Fetch version + uses: kzrnm/get-net-sdk-project-versions-action@v2 + id: get-version + with: + proj-path: src/${{ env.project }}/${{ env.project }}.csproj + + # Upload the nuget package: https://github.com/marketplace/actions/upload-a-build-artifact + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: nuget + path: | + ${{ env.output }}/*.nupkg + ${{ env.output }}/*.snupkg + + # Publish the nuget package: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push + - name: Publish nuget + if: github.ref_name == env.default_branch + run: dotnet nuget push ${{ env.output }}/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate + + # Publish the nuget package: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push + - name: Publish github + if: github.ref_name == env.default_branch + run: dotnet nuget push ${{ env.output }}/**/*.nupkg -s https://nuget.pkg.github.com/${{ github.REPOSITORY_OWNER }}/index.json -k ${{ github.TOKEN }} --skip-duplicate + + # Publish release: https://github.com/softprops/action-gh-release + - name: Publish Release + if: github.ref_name == env.default_branch + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ github.TOKEN }} + with: + tag_name: v${{ steps.get-version.outputs.package-version }} + name: v${{ steps.get-version.outputs.package-version }} + body: v${{ steps.get-version.outputs.package-version }} + draft: true + prerelease: false + files: | + ${{ env.output }}/*.nupkg + ${{ env.output }}/*.snupkg \ No newline at end of file diff --git a/src/Serilog.Enrichers.Autodesk.Revit/Serilog.Enrichers.Autodesk.Revit.csproj b/src/Serilog.Enrichers.Autodesk.Revit/Serilog.Enrichers.Autodesk.Revit.csproj index 4ee3820..6f0add1 100644 --- a/src/Serilog.Enrichers.Autodesk.Revit/Serilog.Enrichers.Autodesk.Revit.csproj +++ b/src/Serilog.Enrichers.Autodesk.Revit/Serilog.Enrichers.Autodesk.Revit.csproj @@ -71,5 +71,7 @@ \ assets\README.md + + From 2b214d7ecf47c36f12f3a1a118b1aa0673578f7f Mon Sep 17 00:00:00 2001 From: dosymep Date: Tue, 14 May 2024 11:40:45 +0300 Subject: [PATCH 4/7] update gitignore --- .gitignore | 4 +++- .../.idea/.gitignore | 11 ----------- .../.idea/.name | 1 - .../.idea/encodings.xml | 4 ---- .../.idea/indexLayout.xml | 8 -------- .../.idea/.gitignore | 11 ----------- .../.idea/.name | 1 - .../.idea/encodings.xml | 4 ---- .../.idea/indexLayout.xml | 8 -------- .../.idea/vcs.xml | 6 ------ 10 files changed, 3 insertions(+), 55 deletions(-) delete mode 100644 src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.gitignore delete mode 100644 src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.name delete mode 100644 src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/encodings.xml delete mode 100644 src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/indexLayout.xml delete mode 100644 src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.gitignore delete mode 100644 src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.name delete mode 100644 src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/encodings.xml delete mode 100644 src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/indexLayout.xml delete mode 100644 src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/vcs.xml diff --git a/.gitignore b/.gitignore index 7094a04..cd01e5f 100644 --- a/.gitignore +++ b/.gitignore @@ -395,4 +395,6 @@ FodyWeavers.xsd # Rider auto-generates .iml files, and contentModel.xml **/.idea/**/*.iml **/.idea/**/contentModel.xml -**/.idea/**/modules.xml \ No newline at end of file +**/.idea/**/modules.xml + +/.idea \ No newline at end of file diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.gitignore b/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.gitignore deleted file mode 100644 index b7a12b9..0000000 --- a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Rider ignored files -/modules.xml -/contentModel.xml -/projectSettingsUpdater.xml -/.idea.Serilog.Enrichers.Autodeks.Revit.iml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.name b/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.name deleted file mode 100644 index c0e722c..0000000 --- a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -Serilog.Enrichers.Autodeks.Revit \ No newline at end of file diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/encodings.xml b/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/encodings.xml deleted file mode 100644 index df87cf9..0000000 --- a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/encodings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/indexLayout.xml b/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/indexLayout.xml deleted file mode 100644 index 7b08163..0000000 --- a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/indexLayout.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.gitignore b/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.gitignore deleted file mode 100644 index c7a43e2..0000000 --- a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Rider ignored files -/projectSettingsUpdater.xml -/modules.xml -/.idea.Serilog.Enrichers.Autodesk.Revit.iml -/contentModel.xml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.name b/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.name deleted file mode 100644 index 0fdf695..0000000 --- a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -Serilog.Enrichers.Autodesk.Revit \ No newline at end of file diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/encodings.xml b/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/encodings.xml deleted file mode 100644 index df87cf9..0000000 --- a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/encodings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/indexLayout.xml b/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/indexLayout.xml deleted file mode 100644 index 7b08163..0000000 --- a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/indexLayout.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/vcs.xml b/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/vcs.xml deleted file mode 100644 index 6c0b863..0000000 --- a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 1566ea02a3f933f712822ae93facdb8b57d61f83 Mon Sep 17 00:00:00 2001 From: dosymep Date: Tue, 14 May 2024 11:41:45 +0300 Subject: [PATCH 5/7] update sln file --- ...vit.sln => Serilog.Enrichers.Autodesk.Revit.sln | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename src/Serilog.Enrichers.Autodesk.Revit.sln => Serilog.Enrichers.Autodesk.Revit.sln (72%) diff --git a/src/Serilog.Enrichers.Autodesk.Revit.sln b/Serilog.Enrichers.Autodesk.Revit.sln similarity index 72% rename from src/Serilog.Enrichers.Autodesk.Revit.sln rename to Serilog.Enrichers.Autodesk.Revit.sln index 2554f80..3bb12fe 100644 --- a/src/Serilog.Enrichers.Autodesk.Revit.sln +++ b/Serilog.Enrichers.Autodesk.Revit.sln @@ -1,17 +1,17 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Enrichers.Autodesk.Revit", "Serilog.Enrichers.Autodesk.Revit\Serilog.Enrichers.Autodesk.Revit.csproj", "{61752A6F-6BA7-4536-9B2A-482771608632}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Enrichers.Autodesk.Revit", "src/Serilog.Enrichers.Autodesk.Revit\Serilog.Enrichers.Autodesk.Revit.csproj", "{61752A6F-6BA7-4536-9B2A-482771608632}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CF804FA7-56A6-4FA0-B201-118E593BD4CD}" ProjectSection(SolutionItems) = preProject - ..\.editorconfig = ..\.editorconfig - ..\CONTRIBUTING.md = ..\CONTRIBUTING.md - ..\CREDITS.md = ..\CREDITS.md - ..\LICENSE.md = ..\LICENSE.md - ..\README.md = ..\README.md + .editorconfig = .editorconfig + CONTRIBUTING.md = CONTRIBUTING.md + CREDITS.md = CREDITS.md + LICENSE.md = LICENSE.md + README.md = README.md EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Enrichers.Autodesk.Revit.Tests", "Serilog.Enrichers.Autodesk.Revit.Tests\Serilog.Enrichers.Autodesk.Revit.Tests.csproj", "{B96FBB4D-121D-421B-897E-DC9E0484ED0C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Enrichers.Autodesk.Revit.Tests", "src/Serilog.Enrichers.Autodesk.Revit.Tests\Serilog.Enrichers.Autodesk.Revit.Tests.csproj", "{B96FBB4D-121D-421B-897E-DC9E0484ED0C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution From e698a6c952f1094cd6109e1c9f83a5da0338a763 Mon Sep 17 00:00:00 2001 From: dosymep Date: Tue, 14 May 2024 11:43:10 +0300 Subject: [PATCH 6/7] add CHANGELOG.md --- CHANGELOG.md | 13 +++++++++++++ Serilog.Enrichers.Autodesk.Revit.sln | 1 + 2 files changed, 14 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a7c4f01 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.0.0] - 2024-05-14 +### Add + +- net8.0 target framework +- ci workflow +- CHANGELOG.md \ No newline at end of file diff --git a/Serilog.Enrichers.Autodesk.Revit.sln b/Serilog.Enrichers.Autodesk.Revit.sln index 3bb12fe..9c6a8e2 100644 --- a/Serilog.Enrichers.Autodesk.Revit.sln +++ b/Serilog.Enrichers.Autodesk.Revit.sln @@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution CREDITS.md = CREDITS.md LICENSE.md = LICENSE.md README.md = README.md + CHANGELOG.md = CHANGELOG.md EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Enrichers.Autodesk.Revit.Tests", "src/Serilog.Enrichers.Autodesk.Revit.Tests\Serilog.Enrichers.Autodesk.Revit.Tests.csproj", "{B96FBB4D-121D-421B-897E-DC9E0484ED0C}" From 728bb5fdd85ad99fdac0430f081689830a33b020 Mon Sep 17 00:00:00 2001 From: dosymep Date: Tue, 14 May 2024 11:44:26 +0300 Subject: [PATCH 7/7] update dependensies --- .../RevitCachedPropertyTests.cs | 2 +- .../Serilog.Enrichers.Autodesk.Revit.Tests.csproj | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Serilog.Enrichers.Autodesk.Revit.Tests/RevitCachedPropertyTests.cs b/src/Serilog.Enrichers.Autodesk.Revit.Tests/RevitCachedPropertyTests.cs index 0f051f3..3e722eb 100644 --- a/src/Serilog.Enrichers.Autodesk.Revit.Tests/RevitCachedPropertyTests.cs +++ b/src/Serilog.Enrichers.Autodesk.Revit.Tests/RevitCachedPropertyTests.cs @@ -16,7 +16,7 @@ public void CustomPropertyEnricherIsApplied() { log.Information(@"Hello, world!"); - Assert.NotNull(testSink.LogEvent); + Assert.That(testSink.LogEvent, Is.Not.Null); Assert.That(propertyValue, Is.EqualTo(GetScalarValue(testSink?.LogEvent, propertyName))); } diff --git a/src/Serilog.Enrichers.Autodesk.Revit.Tests/Serilog.Enrichers.Autodesk.Revit.Tests.csproj b/src/Serilog.Enrichers.Autodesk.Revit.Tests/Serilog.Enrichers.Autodesk.Revit.Tests.csproj index 0c6ff22..327b26d 100644 --- a/src/Serilog.Enrichers.Autodesk.Revit.Tests/Serilog.Enrichers.Autodesk.Revit.Tests.csproj +++ b/src/Serilog.Enrichers.Autodesk.Revit.Tests/Serilog.Enrichers.Autodesk.Revit.Tests.csproj @@ -1,7 +1,7 @@ - net452;net8.0 + net462;net8.0 enable enable false @@ -15,14 +15,14 @@ - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive