Shoko.BuildTools
0.8.3
dotnet tool install --global Shoko.BuildTools --version 0.8.3
dotnet new tool-manifest
dotnet tool install --local Shoko.BuildTools --version 0.8.3
#tool dotnet:?package=Shoko.BuildTools&version=0.8.3
nuke :add-package Shoko.BuildTools --version 0.8.3
Shoko.BuildTools
The shoko-build command: builds and packs a Shoko Server plugin. It wraps MSBuild, stamps the assembly metadata the server reads from a plugin (identity, runtime, release channel, source revision), detects which service contracts the plugin implements, and writes or updates the release manifest a plugin repository serves.
Getting started
dotnet tool install --global Shoko.BuildTools
shoko-build -c Release --channel Stable --tag v1.0.0 --manifest manifest.json
For the metadata alone, on every ordinary dotnet build, reference Shoko.BuildTools.Targets from the plugin project instead.
Plugin metadata
The plugin's identity and tags come from the command line, then the project, then the manifest. Its dependencies come from the command line or the project alone, never the manifest. Its dependencies, the plugins the server loads before it, belong in the project, one PluginDependency item per plugin:
<ItemGroup>
<PluginDependency Include="0f8a1c2e-1111-2222-3333-444455556666" Version="^1.2.0" />
<PluginDependency Include="7d3b9f40-aaaa-bbbb-cccc-ddddeeeeffff" Version=">=2.0" Optional="true" />
</ItemGroup>
They are stamped into the assembly and recorded in the release entry the build adds, along with is_meta when Shoko.BuildTools.Targets marked the plugin as a meta plugin, one that only brings in its dependencies, or not; the manifest's own is_meta sums up its releases. --dependencies and the PluginDependencies property take the same list as one string and replace the items. The other fields are --id, --name, --overview, --namespace and --tags, or the PluginID, PluginName, PluginOverview, PluginNamespace and PluginTags properties. The namespace is optional: a short, unique kebab-case name of 2 to 32 characters the plugin reserves for itself, which other plugins and conventions may key off, of which shoko, core and plugin are reserved; a bad one stops the build. See Plugin metadata and Dependencies in the guide.
Documentation
- Full guide: options, plugin metadata and dependencies, the manifest format
- Plugin template, with a release workflow using this tool
- Issues and Discord
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.