Introduce Exclude Fragments option

Allows you to exclude any fragments that get added. 
Good use case: do not deploy litecoin lightning node when using btc lightning

Should also help users with advanced customization scenarios
This commit is contained in:
Kukks
2019-04-08 08:38:42 +02:00
parent 3aae4069b5
commit 82b076edfe
6 changed files with 18 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -72,6 +72,7 @@ namespace DockerGenerator
{
fragments.Add(fragment.Trim());
}
fragments = fragments.Where(s => !composition.ExcludeFragments.Contains(s)).ToHashSet();
var def = new DockerComposeDefinition(name, fragments.ToList());
def.FragmentLocation = fragmentLocation;
def.BuildOutputDirectory = output;