feat: plugins
This commit is contained in:
		@@ -3,18 +3,15 @@ using Spectre.Console.Cli;
 | 
			
		||||
 | 
			
		||||
namespace Automancer.Command.Image;
 | 
			
		||||
 | 
			
		||||
public class Module : ICommandModuleWithRegistry
 | 
			
		||||
public class Module : ICommandModule
 | 
			
		||||
{
 | 
			
		||||
    public void Configure(IConfigurator config)
 | 
			
		||||
    {
 | 
			
		||||
        // No implementation needed here
 | 
			
		||||
    }
 | 
			
		||||
   public string Name => "image";
 | 
			
		||||
   public string Description => "Docker/podman image operations";
 | 
			
		||||
    public void Configure(IConfigurator config, CommandRegistry registry)
 | 
			
		||||
    {
 | 
			
		||||
        config.AddBranch("image", image => {
 | 
			
		||||
            var description = "Docker/podman image operations";
 | 
			
		||||
            image.SetDescription(description);
 | 
			
		||||
            registry.Add("image", description);
 | 
			
		||||
        config.AddBranch(Name, image => {
 | 
			
		||||
            image.SetDescription(Description);
 | 
			
		||||
            registry.Add(Name, Description);
 | 
			
		||||
 | 
			
		||||
            image.AddCommand<BuildCommand>("build").WithDescription("Build a docker image");
 | 
			
		||||
            image.AddCommand<PushCommand>("push").WithDescription("Push a docker image");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user