diff --git a/Sitefinity CLI/Commands/UpgradeCommand.cs b/Sitefinity CLI/Commands/UpgradeCommand.cs index e9ec49d7..d74dcd6b 100644 --- a/Sitefinity CLI/Commands/UpgradeCommand.cs +++ b/Sitefinity CLI/Commands/UpgradeCommand.cs @@ -131,7 +131,7 @@ protected virtual async Task ExecuteUpgrade() } } - await this.GenerateUpgradeConfig(sitefinityProjectFilePaths, newSitefinityPackage); + await this.GenerateUpgradeConfig(sitefinityProjectFilePaths, newSitefinityPackage, packageSources); var updaterPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, Constants.SitefinityUpgradePowershellFolderName, "Updater.ps1"); this.visualStudioWorker.Initialize(this.SolutionPath); @@ -278,7 +278,7 @@ private string ReadAllTextFromFile(string path) } } - private async Task GenerateUpgradeConfig(IEnumerable projectFilePaths, NuGetPackage newSitefinityVersionPackageTree) + private async Task GenerateUpgradeConfig(IEnumerable projectFilePaths, NuGetPackage newSitefinityVersionPackageTree, IEnumerable packageSources) { this.logger.LogInformation("Exporting upgrade config..."); @@ -288,7 +288,7 @@ private async Task GenerateUpgradeConfig(IEnumerable projectFilePaths, N foreach (string projectFilePath in projectFilePaths) { - await this.GenerateProjectUpgradeConfigSection(powerShellXmlConfig, powerShellXmlConfigNode, projectFilePath, newSitefinityVersionPackageTree); + await this.GenerateProjectUpgradeConfigSection(powerShellXmlConfig, powerShellXmlConfigNode, projectFilePath, newSitefinityVersionPackageTree, packageSources); } powerShellXmlConfig.Save(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Constants.SitefinityUpgradePowershellFolderName, "config.xml")); @@ -296,7 +296,7 @@ private async Task GenerateUpgradeConfig(IEnumerable projectFilePaths, N this.logger.LogInformation("Successfully exported upgrade config!"); } - private async Task GenerateProjectUpgradeConfigSection(XmlDocument powerShellXmlConfig, XmlElement powerShellXmlConfigNode, string projectFilePath, NuGetPackage newSitefinityVersionPackageTree) + private async Task GenerateProjectUpgradeConfigSection(XmlDocument powerShellXmlConfig, XmlElement powerShellXmlConfigNode, string projectFilePath, NuGetPackage newSitefinityVersionPackageTree, IEnumerable packageSources) { XmlElement projectNode = powerShellXmlConfig.CreateElement("project"); XmlAttribute projectNameAttribute = powerShellXmlConfig.CreateAttribute("name"); @@ -315,7 +315,7 @@ private async Task GenerateProjectUpgradeConfigSection(XmlDocument powerShellXml this.logger.LogInformation($"Detected sitefinity version for '{projectFilePath}' - '{currentSitefinityVersion}'."); this.logger.LogInformation($"Collecting Sitefinity NuGet package tree for '{projectFilePath}'..."); - NuGetPackage currentSitefinityVersionPackageTree = await this.sitefinityPackageManager.GetSitefinityPackageTree(currentSitefinityVersion.ToString()); + NuGetPackage currentSitefinityVersionPackageTree = await this.sitefinityPackageManager.GetSitefinityPackageTree(currentSitefinityVersion.ToString(), packageSources); this.processedPackagesPerProjectCache[projectFilePath] = new HashSet(); if (!this.TryAddPackageTreeToProjectUpgradeConfigSection(powerShellXmlConfig, projectNode, projectFilePath, currentSitefinityVersionPackageTree, newSitefinityVersionPackageTree)) diff --git a/Sitefinity CLI/Sitefinity CLI.csproj b/Sitefinity CLI/Sitefinity CLI.csproj index b6b964fd..10e18895 100644 --- a/Sitefinity CLI/Sitefinity CLI.csproj +++ b/Sitefinity CLI/Sitefinity CLI.csproj @@ -5,9 +5,9 @@ netcoreapp3.0 sf Sitefinity_CLI - 1.1.0.21 + 1.1.0.22 1.1.0 - 1.1.0.21 + 1.1.0.22 false false