feat: support template plugin path #2642
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, we need to manage several configuration files for each os and architecture. (e.g.,
linux-amd64
,linux-arm64
, etc) becausepluginPath
field is a constant string.This pull request introduces a new feature for
pluginPath
field inappsettings.json
-like configuration files.To use this feature, you must specify
version
field to2
first.The
actionEvaluator
withversion: 2
andtype: PluggedActionEvaluator
, usespluginPath
as template.The decoder of
actionEvaluator
replaces the following keywords inpluginPath
, with corresponding values.<os>
: Operating Systems. (macOS
→osx
,Windows
→win
,Linux
→linux
, not supported else) (It is determined by .NETRuntimeInformation.IsOSPlatform(...)
).<arch>
: OS Architecture. (x64
→x64
,x86
→x86
,Arm64
→arm64
,Arm
→arm
, not supported else) (It is determined by .NETRuntimeInformation.OSArchitecture
).<rid>
: Same with<os>-<arch>
(e.g.,linux-arm64
) (https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids)Or