From dd592efef2eb5dfb504be5036c7f0590f3c894ca Mon Sep 17 00:00:00 2001 From: Robert Date: Fri, 6 Aug 2021 22:23:17 +0200 Subject: [PATCH 1/4] Dynamic data models - Don't throw on dynamic child type mismatch --- src/Artemis.Core/Plugins/Modules/DataModel.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Artemis.Core/Plugins/Modules/DataModel.cs b/src/Artemis.Core/Plugins/Modules/DataModel.cs index c2eb187c9..4a0ab079e 100644 --- a/src/Artemis.Core/Plugins/Modules/DataModel.cs +++ b/src/Artemis.Core/Plugins/Modules/DataModel.cs @@ -258,7 +258,12 @@ namespace Artemis.Core.Modules internal T? GetDynamicChildValue(string key) { if (TryGetDynamicChild(key, out DynamicChild? dynamicChild) && dynamicChild.BaseValue != null) - return (T) dynamicChild.BaseValue; + { + if (dynamicChild.BaseValue is T value) + return value; + return default; + } + return default; } From 1e62213a6f9d9932120748ba3dfe4135b0e83813 Mon Sep 17 00:00:00 2001 From: Robert Beekman Date: Sun, 12 Sep 2021 09:56:39 +0200 Subject: [PATCH 2/4] Added Artemis.Plugins.Games to build --- ci/azure-pipelines.yml | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 8e16ec412..b95f6b477 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -18,7 +18,12 @@ resources: type: github endpoint: github.com_SpoinkyNL name: Artemis-RGB/Artemis.Plugins - ref: master + ref: master + - repository: GamePlugins + type: github + endpoint: github.com_SpoinkyNL + name: Artemis-RGB/Artemis.Plugins.Games + ref: master pool: vmImage: 'windows-latest' @@ -27,6 +32,7 @@ variables: artemisSolution: '**/Artemis.sln' rgbSolution: '**/RGB.NET.sln' pluginProjects: '**/Artemis.Plugins.*.csproj' + gamePluginProjects: '**/Artemis.Plugins.Games.*.csproj' BuildId: $(Build.BuildId) BuildNumber: $(Build.BuildNumber) SourceBranch: $(Build.SourceBranch) @@ -39,6 +45,8 @@ steps: path: s/Artemis - checkout: Plugins path: s/Artemis.Plugins +- checkout: GamePlugins + path: s/Artemis.Plugins.Games - task: DotNetCoreCLI@2 displayName: 'RGB.NET - Build' @@ -75,14 +83,14 @@ steps: # Copy Artemis binaries to where plugin projects expect them - task: CopyFiles@2 - displayName: 'Plugins - Prepare Artemis binaries' + displayName: 'Artemis.Plugins - Prepare Artemis binaries' inputs: SourceFolder: '$(Build.ArtifactStagingDirectory)/build' Contents: '**' TargetFolder: 'Artemis/src/Artemis.UI/bin/net5.0-windows' - task: PowerShell@2 - displayName: 'Plugins - Insert build number into plugin.json' + displayName: 'Artemis.Plugins - Insert build number into plugin.json' inputs: targetType: 'inline' script: | @@ -95,6 +103,29 @@ steps: } workingDirectory: 'Artemis.Plugins' +- task: DotNetCoreCLI@2 + displayName: 'Artemis.Plugins.Games - Publish' + inputs: + command: 'publish' + publishWebProjects: false + arguments: '--runtime win-x64 --configuration Release --self-contained false --output $(Build.ArtifactStagingDirectory)/build/Plugins' + projects: '$(pluginProjects)' + zipAfterPublish: true + +- task: PowerShell@2 + displayName: 'Artemis.Plugins.Games - Insert build number into plugin.json' + inputs: + targetType: 'inline' + script: | + Get-ChildItem -Recurse -Filter plugin.json | + Foreach-Object { + $buidNumber = "1.0.1." + $Env:BUILD_BUILDID; + $a = Get-Content $_.FullName | ConvertFrom-Json + $a.Version = $buidNumber; + $a | ConvertTo-Json | Set-Content $_.FullName + } + workingDirectory: 'Artemis.Plugins.Games' + - task: DotNetCoreCLI@2 displayName: 'Plugins - Publish' inputs: From a68f06d4b7af52879ec477bfb0689679b137750e Mon Sep 17 00:00:00 2001 From: Robert Beekman Date: Sun, 12 Sep 2021 09:56:39 +0200 Subject: [PATCH 3/4] Revert "Added Artemis.Plugins.Games to build" This reverts commit 1e62213a6f9d9932120748ba3dfe4135b0e83813. --- ci/azure-pipelines.yml | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index b95f6b477..8e16ec412 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -18,12 +18,7 @@ resources: type: github endpoint: github.com_SpoinkyNL name: Artemis-RGB/Artemis.Plugins - ref: master - - repository: GamePlugins - type: github - endpoint: github.com_SpoinkyNL - name: Artemis-RGB/Artemis.Plugins.Games - ref: master + ref: master pool: vmImage: 'windows-latest' @@ -32,7 +27,6 @@ variables: artemisSolution: '**/Artemis.sln' rgbSolution: '**/RGB.NET.sln' pluginProjects: '**/Artemis.Plugins.*.csproj' - gamePluginProjects: '**/Artemis.Plugins.Games.*.csproj' BuildId: $(Build.BuildId) BuildNumber: $(Build.BuildNumber) SourceBranch: $(Build.SourceBranch) @@ -45,8 +39,6 @@ steps: path: s/Artemis - checkout: Plugins path: s/Artemis.Plugins -- checkout: GamePlugins - path: s/Artemis.Plugins.Games - task: DotNetCoreCLI@2 displayName: 'RGB.NET - Build' @@ -83,14 +75,14 @@ steps: # Copy Artemis binaries to where plugin projects expect them - task: CopyFiles@2 - displayName: 'Artemis.Plugins - Prepare Artemis binaries' + displayName: 'Plugins - Prepare Artemis binaries' inputs: SourceFolder: '$(Build.ArtifactStagingDirectory)/build' Contents: '**' TargetFolder: 'Artemis/src/Artemis.UI/bin/net5.0-windows' - task: PowerShell@2 - displayName: 'Artemis.Plugins - Insert build number into plugin.json' + displayName: 'Plugins - Insert build number into plugin.json' inputs: targetType: 'inline' script: | @@ -103,29 +95,6 @@ steps: } workingDirectory: 'Artemis.Plugins' -- task: DotNetCoreCLI@2 - displayName: 'Artemis.Plugins.Games - Publish' - inputs: - command: 'publish' - publishWebProjects: false - arguments: '--runtime win-x64 --configuration Release --self-contained false --output $(Build.ArtifactStagingDirectory)/build/Plugins' - projects: '$(pluginProjects)' - zipAfterPublish: true - -- task: PowerShell@2 - displayName: 'Artemis.Plugins.Games - Insert build number into plugin.json' - inputs: - targetType: 'inline' - script: | - Get-ChildItem -Recurse -Filter plugin.json | - Foreach-Object { - $buidNumber = "1.0.1." + $Env:BUILD_BUILDID; - $a = Get-Content $_.FullName | ConvertFrom-Json - $a.Version = $buidNumber; - $a | ConvertTo-Json | Set-Content $_.FullName - } - workingDirectory: 'Artemis.Plugins.Games' - - task: DotNetCoreCLI@2 displayName: 'Plugins - Publish' inputs: From 6a0d7f4d7c6d3af73014f347c6d0151c6fd26e0a Mon Sep 17 00:00:00 2001 From: Robert Date: Sun, 12 Sep 2021 10:08:15 +0200 Subject: [PATCH 4/4] Meta - Fix GitHub sponsorship button [ci ignore] --- .github/FUNDING.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 6b70ea0f6..3e71dd4bc 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ -github: [spoinkynl] \ No newline at end of file +github: [robertbeekman] +custom: ['https://www.paypal.com/donate/?cmd=_s-xclick&hosted_button_id=VQBAEJYUFLU4J'] \ No newline at end of file