public int Execute()
        {
            return(ConsoleTask.Execute(this, console =>
            {
                console.WriteLine("Getting package information...");
                var dirs = SharedOptions.GetDirectories(BasePackage, OurPackage).ToList();

                var script = default(InstallScript);
                console.Write("Calculating diffs... ");
                using (var prog = new ProgressBar())
                {
                    var processor = new MergeProcessor()
                    {
                        SortDependencies = true
                    };
                    if (!string.IsNullOrEmpty(FirstOfGroup))
                    {
                        processor.FirstOfGroup.UnionWith(FirstOfGroup.Split(','));
                    }
                    processor.ProgressChanged += (s, ev) => prog.Report(ev.Progress / 100.0);
                    script = processor.Merge(dirs[0], dirs[1]);
                }
                console.WriteLine("Done.");

                SharedOptions.WritePackage(console, script, Output, MultipleDirectories, CleanOutput);
            }));
        }
Example #2
0
 public async Task <int> Execute(ILogger logger)
 {
     return(ConsoleTask.Execute(this, (console) =>
     {
         console.WriteLine("Getting package information...");
         var script = Package.Create(InputFile).Single().Read();
         SharedOptions.WritePackage(console, script, Output, MultipleDirectories, CleanOutput);
     }));
 }
Example #3
0
 public int Execute()
 {
     return(ConsoleTask.Execute(this, (console) =>
     {
         console.WriteLine("Getting package information...");
         var script = InnovatorPackage.Load(InputFile).Read();
         SharedOptions.WritePackage(console, script, Output, MultipleDirectories, CleanOutput);
     }));
 }