Skip to content

pietroserrano/plugutopia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PlugUtopia

Develop, Connect and Deploy.


Logo Banner

Nuget Nuget

GitHub Release GitHub Release


Getting Started

docker-compose.yml example

version: '3.5'

services:
  plugutopia-console:
    image: plugutopia-console
    
    volumes:
      - ./plugins:/app/plugins

    environment:
      - BotConfiguration__BotToken=<token>
      - BotConfiguration__Whitelist__0=<username1>
      - BotConfiguration__Whitelist__N=<usernameN>

or

docker build . -f Apps/PlugUtopia.Console/Dockerfile -t plugutopia-console

or

docker buildx build --platform linux/amd64 . -f Apps/PlugUtopia.Console/Dockerfile -t plugutopia-console

How to create plugin

  1. Install dotnet templatate
 dotnet new install PlugUtopia.Plugin.Templates
  1. Create project
cd path/to/proj
mkdir proj_name
cd proj_name
dotnet new plugutopia-plugin -n proj_name  
  1. Install the tool needed to create the manifest:
dotnet nuget add source -u [GithubUserName] -p [YourApiKey] -n gh-plugutopia https://nuget.pkg.github.com/pietroserrano/index.json
dotnet tool install -g PlugUtopia.Plugin.Tools

How to add plugin infrastructure to existing app

  1. Add the following statements to your project file:
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
  <Exec Command="plugutopia-tools --generate-manifest $(OutDir) $([System.IO.Path]::Combine($(TargetDir), $(AssemblyName)))" />
</Target>
  1. Create a new internal-manifest.json file to your project and add it as an embedded resource
{
  "category": "",
  "changelog": "github.com/readme.md",
  "description": "plugin description",
  "name": "plugin name",
  "overview": "",
  "owner": "",
  "targetAbi": "1.0.0",
  "guid": ""
}
<ItemGroup>
  <None Remove="internal-manifest.json" />
  <EmbeddedResource Include="internal-manifest.json" />
</ItemGroup>
  1. Install the tool needed to create the manifest:
dotnet nuget add source -u [GithubUserName] -p [YourApiKey] -n gh-plugutopia https://nuget.pkg.github.com/pietroserrano/index.json
dotnet tool install -g PlugUtopia.Plugin.Tools
  1. Verify that, after compiling the project, the manifest.json file is created correctly and that it contains all the DLLs needed for the plugin to work.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors