diff options
author | vnugent <public@vaughnnugent.com> | 2024-05-07 17:01:22 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-05-07 17:01:22 -0400 |
commit | 79d824cfb0e0cc9ff4fab0e0c546a83c0edaae1c (patch) | |
tree | d69e962a15493b2e36882810a2cc43d5a0de1a0b /src/Commands/CleanCommand.cs | |
parent | b3015399591bd81b8519f0efa2ec177163f7d04a (diff) |
initial commit
Diffstat (limited to 'src/Commands/CleanCommand.cs')
-rw-r--r-- | src/Commands/CleanCommand.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Commands/CleanCommand.cs b/src/Commands/CleanCommand.cs new file mode 100644 index 0000000..6570b31 --- /dev/null +++ b/src/Commands/CleanCommand.cs @@ -0,0 +1,31 @@ +using System; +using System.Threading.Tasks; + +using Typin.Console; +using Typin.Attributes; + +using VNLib.Tools.Build.Executor.Model; +using VNLib.Tools.Build.Executor.Constants; + +namespace VNLib.Tools.Build.Executor.Commands +{ + + [Command("clean", Description = "Cleans the build pipeline")] + public sealed class CleanCommand(BuildPipeline pipeline, ConfigManager cfg) : BaseCommand(pipeline, cfg) + { + public override async ValueTask ExecStepsAsync(IConsole console) + { + console.Output.WriteLine("Begining clean step"); + + await pipeline.DoStepCleanAsync(); + + //Cleanup the sum dir and scratch dir + Config.Index.SumDir.Delete(true); + Config.Index.ScratchDir.Delete(true); + + console.WithForegroundColor(ConsoleColor.Green, o => o.Output.WriteLine("Pipeline cleaned")); + } + + public override IFeedManager[] Feeds => []; + } +}
\ No newline at end of file |