From 3ff4eb4de873ebc57965e2fd3fc6dd7150504291 Mon Sep 17 00:00:00 2001 From: Jordi Date: Mon, 5 Feb 2024 11:02:10 +0100 Subject: [PATCH 1/2] Several improvements --- .github/workflows/CI-2x.yml | 16 +++---- .github/workflows/CI-3x.yml | 18 ++++---- .github/workflows/CI-PullRequest-2x.yml | 6 +-- .github/workflows/CI-PullRequest-3x.yml | 8 ++-- CHANGELOG.md | 14 ++++++ FakeXrmEasy.Plugins.sln | 12 ++--- build-push-local.ps1 | 2 +- build.ps1 | 6 +-- .../FakeXrmEasy.Plugins.csproj | 26 +++++------ .../FakeXrmEasy.Plugins.Tests.csproj | 44 +++++++++---------- 10 files changed, 83 insertions(+), 69 deletions(-) diff --git a/.github/workflows/CI-2x.yml b/.github/workflows/CI-2x.yml index 689de86..840277a 100644 --- a/.github/workflows/CI-2x.yml +++ b/.github/workflows/CI-2x.yml @@ -38,7 +38,7 @@ jobs: - name: Build run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFrameworks 'all' env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} sonar: @@ -86,11 +86,11 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} shell: powershell run: | - .\.sonar\scanner\dotnet-sonarscanner begin /k:"DynamicsValue_fake-xrm-easy-plugins" /o:"dynamicsvalue" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.verbose="true" /d:sonar.qualitygate.wait="true" /d:sonar.cs.opencover.reportsPaths='"coverage/**/coverage.opencover.xml"' /d:sonar.coverage.exclusions='"tests/**/**"' + .\.sonar\scanner\dotnet-sonarscanner begin /k:"${{ vars.SONAR_PROJECT_PREFIX }}_fake-xrm-easy-plugins" /o:"${{ vars.SONAR_ORG_NAME }}" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.verbose="true" /d:sonar.qualitygate.wait="true" /d:sonar.cs.opencover.reportsPaths='"coverage/**/coverage.opencover.xml"' /d:sonar.coverage.exclusions='"tests/**/**"' .\build.ps1 -configuration FAKE_XRM_EASY_9 -targetFrameworks 'all' .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" @@ -115,32 +115,32 @@ jobs: - name: Build run: pwsh ./build.ps1 -targetFrameworks 'all' env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} - name: Pack Src run: pwsh ./pack-src.ps1 -targetFrameworks 'all' -versionSuffix "zci.${{ github.head_ref }}${{ github.run_number }}" env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} - name: Push Src run: nuget.exe push .\nupkgs\FakeXrmEasy.Plugins.*.nupkg -Source ${{ env.source-url }} env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_AUTH_TOKEN: ${{ github.token }} NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Pack Tests run: pwsh ./pack-tests.ps1 -targetFrameworks 'all' -versionSuffix "zci.${{ github.head_ref }}${{ github.run_number }}" env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} - name: Push Tests run: nuget.exe push .\nupkgs\FakeXrmEasy.PluginsTests.*.nupkg -Source ${{ env.source-url }} env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_AUTH_TOKEN: ${{ github.token }} NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/CI-3x.yml b/.github/workflows/CI-3x.yml index b738ea6..4689b4e 100644 --- a/.github/workflows/CI-3x.yml +++ b/.github/workflows/CI-3x.yml @@ -38,7 +38,7 @@ jobs: - name: Build run: pwsh ./build.ps1 env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} build-windows: @@ -66,7 +66,7 @@ jobs: - name: Build run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFrameworks 'all' env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} sonar: @@ -94,7 +94,7 @@ jobs: testCommand: dotnet test . --configuration FAKE_XRM_EASY_9 --framework netcoreapp3.1 --verbosity normal --collect:"XPlat code coverage" --settings tests/.runsettings --results-directory ./coverage projectKey: ${{ secrets.SONAR_PROJECT_KEY }} projectName: fake-xrm-easy-plugins - sonarOrganisation: dynamicsvalue + sonarOrganisation: ${{ vars.SONAR_ORG_NAME }} beginArguments: > /d:sonar.verbose="true" /d:sonar.qualitygate.wait="true" @@ -103,7 +103,7 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} pack-push: @@ -127,32 +127,32 @@ jobs: - name: Build run: pwsh ./build.ps1 -targetFrameworks 'all' env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} - name: Pack Src run: pwsh ./pack-src.ps1 -targetFrameworks 'all' -versionSuffix "zci.${{ github.head_ref }}${{ github.run_number }}" env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} - name: Push Src run: nuget.exe push .\nupkgs\FakeXrmEasy.Plugins.*.nupkg -Source ${{ env.source-url }} env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_AUTH_TOKEN: ${{ github.token }} NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Pack Tests run: pwsh ./pack-tests.ps1 -targetFrameworks 'all' -versionSuffix "zci.${{ github.head_ref }}${{ github.run_number }}" env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} - name: Push Tests run: nuget.exe push .\nupkgs\FakeXrmEasy.PluginsTests.*.nupkg -Source ${{ env.source-url }} env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_AUTH_TOKEN: ${{ github.token }} NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/CI-PullRequest-2x.yml b/.github/workflows/CI-PullRequest-2x.yml index 7952f52..1726b77 100644 --- a/.github/workflows/CI-PullRequest-2x.yml +++ b/.github/workflows/CI-PullRequest-2x.yml @@ -38,7 +38,7 @@ jobs: - name: Build run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFrameworks 'all' env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} sonar: @@ -86,11 +86,11 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} shell: powershell run: | - .\.sonar\scanner\dotnet-sonarscanner begin /k:"DynamicsValue_fake-xrm-easy-plugins" /o:"dynamicsvalue" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.verbose="true" /d:sonar.qualitygate.wait="true" /d:sonar.cs.opencover.reportsPaths="coverage/**/coverage.opencover.xml" /d:sonar.coverage.exclusions="tests/**/**" + .\.sonar\scanner\dotnet-sonarscanner begin /k:"${{ vars.SONAR_PROJECT_PREFIX }}_fake-xrm-easy-plugins" /o:"${{ vars.SONAR_ORG_NAME }}" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.verbose="true" /d:sonar.qualitygate.wait="true" /d:sonar.cs.opencover.reportsPaths="coverage/**/coverage.opencover.xml" /d:sonar.coverage.exclusions="tests/**/**" .\build.ps1 -configuration FAKE_XRM_EASY_9 -targetFrameworks 'all' .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" diff --git a/.github/workflows/CI-PullRequest-3x.yml b/.github/workflows/CI-PullRequest-3x.yml index 081b53a..ff004ab 100644 --- a/.github/workflows/CI-PullRequest-3x.yml +++ b/.github/workflows/CI-PullRequest-3x.yml @@ -38,7 +38,7 @@ jobs: - name: Build run: pwsh ./build.ps1 env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} build-windows: @@ -66,7 +66,7 @@ jobs: - name: Build run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFrameworks 'all' env: - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} sonar: @@ -94,7 +94,7 @@ jobs: testCommand: dotnet test . --configuration FAKE_XRM_EASY_9 --framework netcoreapp3.1 --verbosity normal --collect:"XPlat code coverage" --settings tests/.runsettings --results-directory ./coverage projectKey: ${{ secrets.SONAR_PROJECT_KEY }} projectName: fake-xrm-easy-plugins - sonarOrganisation: dynamicsvalue + sonarOrganisation: ${{ vars.SONAR_ORG_NAME }} beginArguments: > /d:sonar.verbose="true" /d:sonar.qualitygate.wait="true" @@ -103,5 +103,5 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NUGET_USERNAME: DynamicsValue + NUGET_USERNAME: ${{github.repository_owner}} NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fe1c39..49b61bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## [2.4.0] + +## Added + +- **Alpha**: Introduced subscription usage monitoring based on customer feedback + +## Changed + +- Set default build configuration in solution file to FAKE_XRM_EASY_9 +- build.ps1 improvements: do not build project twice (added --no-build) when running dotnet test, do not build again either when packing assemblies either: https://github.com/DynamicsValue/fake-xrm-easy/issues/119 +- Remove release notes from package description: https://github.com/DynamicsValue/fake-xrm-easy/issues/115 +- Update build scripts to use 'all' target frameworks by default - https://github.com/DynamicsValue/fake-xrm-easy/issues/126 +- Update github actions to use new Sonar environment variables - https://github.com/DynamicsValue/fake-xrm-easy/issues/120 + ## [2.3.3] ### Added diff --git a/FakeXrmEasy.Plugins.sln b/FakeXrmEasy.Plugins.sln index 62f9ac1..7f2da14 100644 --- a/FakeXrmEasy.Plugins.sln +++ b/FakeXrmEasy.Plugins.sln @@ -46,6 +46,12 @@ Global FAKE_XRM_EASY|x86 = FAKE_XRM_EASY|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_9|Any CPU.ActiveCfg = FAKE_XRM_EASY_9|Any CPU + {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_9|Any CPU.Build.0 = FAKE_XRM_EASY_9|Any CPU + {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_9|x64.ActiveCfg = FAKE_XRM_EASY_9|Any CPU + {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_9|x64.Build.0 = FAKE_XRM_EASY_9|Any CPU + {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_9|x86.ActiveCfg = FAKE_XRM_EASY_9|Any CPU + {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_9|x86.Build.0 = FAKE_XRM_EASY_9|Any CPU {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_2013|Any CPU.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_2013|Any CPU.Build.0 = FAKE_XRM_EASY_2013|Any CPU {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_2013|x64.ActiveCfg = FAKE_XRM_EASY_2013|Any CPU @@ -70,12 +76,6 @@ Global {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_365|x64.Build.0 = FAKE_XRM_EASY_365|Any CPU {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_365|x86.ActiveCfg = FAKE_XRM_EASY_365|Any CPU {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_365|x86.Build.0 = FAKE_XRM_EASY_365|Any CPU - {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_9|Any CPU.ActiveCfg = FAKE_XRM_EASY_9|Any CPU - {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_9|Any CPU.Build.0 = FAKE_XRM_EASY_9|Any CPU - {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_9|x64.ActiveCfg = FAKE_XRM_EASY_9|Any CPU - {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_9|x64.Build.0 = FAKE_XRM_EASY_9|Any CPU - {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_9|x86.ActiveCfg = FAKE_XRM_EASY_9|Any CPU - {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY_9|x86.Build.0 = FAKE_XRM_EASY_9|Any CPU {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY|Any CPU.ActiveCfg = FAKE_XRM_EASY|Any CPU {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY|Any CPU.Build.0 = FAKE_XRM_EASY|Any CPU {3A4394CA-3FBA-47D4-B570-68F4DF5433D3}.FAKE_XRM_EASY|x64.ActiveCfg = FAKE_XRM_EASY|Any CPU diff --git a/build-push-local.ps1 b/build-push-local.ps1 index 119a512..cb12027 100644 --- a/build-push-local.ps1 +++ b/build-push-local.ps1 @@ -1,6 +1,6 @@ param ( - [string]$targetFrameworks = "netcoreapp3.1" + [string]$targetFrameworks = "all" ) Write-Host " -> Checking local packages..." -ForegroundColor Yellow diff --git a/build.ps1 b/build.ps1 index 64c8e31..33a6744 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,5 +1,5 @@ param ( - [string]$targetFrameworks = "netcoreapp3.1", + [string]$targetFrameworks = "all", [string]$configuration = "FAKE_XRM_EASY_9", [string]$packTests = "" ) @@ -63,12 +63,12 @@ if(!($LASTEXITCODE -eq 0)) { if($targetFrameworks -eq "all") { - dotnet test --configuration $configuration --no-restore --verbosity normal /p:PackTests=$packTests --collect:"XPlat code coverage" --settings tests/.runsettings --results-directory ./coverage + dotnet test --configuration $configuration --no-build --verbosity normal /p:PackTests=$packTests --collect:"XPlat code coverage" --settings tests/.runsettings --results-directory ./coverage } else { - dotnet test --configuration $configuration --no-restore --framework $targetFrameworks --verbosity normal /p:PackTests=$packTests --collect:"XPlat code coverage" --settings tests/.runsettings --results-directory ./coverage + dotnet test --configuration $configuration --no-build --framework $targetFrameworks --verbosity normal /p:PackTests=$packTests --collect:"XPlat code coverage" --settings tests/.runsettings --results-directory ./coverage } if(!($LASTEXITCODE -eq 0)) { diff --git a/src/FakeXrmEasy.Plugins/FakeXrmEasy.Plugins.csproj b/src/FakeXrmEasy.Plugins/FakeXrmEasy.Plugins.csproj index f7562a9..0f773cd 100644 --- a/src/FakeXrmEasy.Plugins/FakeXrmEasy.Plugins.csproj +++ b/src/FakeXrmEasy.Plugins/FakeXrmEasy.Plugins.csproj @@ -8,7 +8,7 @@ net452 net452 FakeXrmEasy.Plugins - 2.3.3 + 2.4.0 Jordi Montaña Dynamics Value FakeXrmEasy Plugins @@ -106,28 +106,28 @@ - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/tests/FakeXrmEasy.Plugins.Tests/FakeXrmEasy.Plugins.Tests.csproj b/tests/FakeXrmEasy.Plugins.Tests/FakeXrmEasy.Plugins.Tests.csproj index bedec28..a61de9f 100644 --- a/tests/FakeXrmEasy.Plugins.Tests/FakeXrmEasy.Plugins.Tests.csproj +++ b/tests/FakeXrmEasy.Plugins.Tests/FakeXrmEasy.Plugins.Tests.csproj @@ -11,7 +11,7 @@ true FakeXrmEasy.PluginsTests - 2.3.3 + 2.4.0 Jordi Montaña Dynamics Value S.L. Internal Unit test suite for FakeXrmEasy.Plugins package @@ -124,38 +124,38 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + From 704f90ce0914ed8bfa5f73f386de1790263cec3e Mon Sep 17 00:00:00 2001 From: Jordi Date: Mon, 5 Feb 2024 11:15:44 +0100 Subject: [PATCH 2/2] Increment version for Performance project as well --- .../FakeXrmEasy.Plugins.Performance.csproj | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/performance/FakeXrmEasy.Plugins.Performance/FakeXrmEasy.Plugins.Performance.csproj b/performance/FakeXrmEasy.Plugins.Performance/FakeXrmEasy.Plugins.Performance.csproj index ed38478..f73ace7 100644 --- a/performance/FakeXrmEasy.Plugins.Performance/FakeXrmEasy.Plugins.Performance.csproj +++ b/performance/FakeXrmEasy.Plugins.Performance/FakeXrmEasy.Plugins.Performance.csproj @@ -50,48 +50,48 @@ - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - +