private VsixFeedBuilderResults Run(string vsixStoragePath) { var packageFactory = new VsixPackageFactory(); var feed = CreateAtomFeed(Path.Combine(vsixStoragePath, "atom.xml"), packageFactory.LoadAll(vsixStoragePath)); return(new VsixFeedBuilderResults(feed)); }
private static void _GenerateAtomFeed(string rootDirectory, Logger log) { log.Info("Loading vsix files"); var packageFactory = new VsixPackageFactory(); var packages = Directory .EnumerateFiles(rootDirectory, "*.vsix", SearchOption.AllDirectories) .Select(file => packageFactory.LoadFromFile(file, log)) .Do(result => result.IfError(log.Error)) .TakeSuccess() .ToArray(); packages = _OnlyMostRecentVersions(packages, log).ToArray(); var feedFile = Path.Combine(rootDirectory, "atom.xml"); var feedBuilder = new FeedBuilder(); feedBuilder.WriteFeed(feedFile, packages, log); log.Info("Feed generated successfully"); }