31 lines
746 B
C#
31 lines
746 B
C#
using System.ComponentModel;
|
|
using Spectre.Console.Cli;
|
|
|
|
namespace Automancer.Command.Image;
|
|
|
|
public class PushSettings: CommandSettings
|
|
{
|
|
[CommandArgument(0, "[path]")]
|
|
[Description("Path to the Dockerfile")]
|
|
public string? Path { get; set; }
|
|
|
|
[CommandOption("-t|--tag")]
|
|
[Description("Tag to use for the image")]
|
|
public string? Tag { get; set; }
|
|
|
|
[CommandOption("-f|--file")]
|
|
[Description("Path to the Dockerfile")]
|
|
public string? File { get; set; }
|
|
}
|
|
|
|
public class PushCommand : Command<BuldSettings>
|
|
{
|
|
public override int Execute(CommandContext context, BuldSettings settings)
|
|
{
|
|
Console.WriteLine($"Building image from {settings.Path} with tag {settings.Tag}");
|
|
|
|
return 0;
|
|
}
|
|
}
|
|
|