Esempio n. 1
0
 public static ExternalModuleCatalog GetCatalog(IOptions <ExternalModuleCatalogOptions> options, LocalStorageModuleCatalog localCatalog)
 {
     if (_catalog == null)
     {
         var platformRelease = GithubManager.GetPlatformRelease(null).GetAwaiter().GetResult();
         PlatformVersion.CurrentVersion = new SemanticVersion(Version.Parse(platformRelease.TagName)); // workaround to see all modules in the external catalog
         var client = new ExternalModulesClient(options);
         var logger = new LoggerFactory().CreateLogger <ExternalModuleCatalog>();
         _catalog = new ExternalModuleCatalog(localCatalog, client, options, logger);
         _catalog.Load();
     }
     else
     {
         _catalog.Reload();
     }
     return(_catalog);
 }
Esempio n. 2
0
 public static async Task <Release> GetModuleRelease(string token, string moduleRepo, string releaseTag)
 {
     GithubManager.SetAuthToken(token);
     return(await GithubManager.GetModuleRelease(moduleRepo, releaseTag));
 }