From 0e12d1ad415fa3a556c92ef5c503fe6e7af35624 Mon Sep 17 00:00:00 2001
From: NanxiangLiu <33285578+Nickcandy@users.noreply.github.com>
Date: Wed, 11 Dec 2024 09:34:17 +0800
Subject: [PATCH] remove test gallery from bump up version (#26857)
---
tools/VersionController/Models/ModuleHelper.cs | 2 +-
tools/VersionController/Program.cs | 15 ---------------
2 files changed, 1 insertion(+), 16 deletions(-)
diff --git a/tools/VersionController/Models/ModuleHelper.cs b/tools/VersionController/Models/ModuleHelper.cs
index 2f8050b38d5f..d64df6a8c030 100644
--- a/tools/VersionController/Models/ModuleHelper.cs
+++ b/tools/VersionController/Models/ModuleHelper.cs
@@ -32,7 +32,7 @@ internal static string GetLatestVersionFromPSGallery(string moduleName, ReleaseT
}
///
- /// Get version from PSGallery and TestGallery and merge into one list.
+ /// Get version from PSGallery and merge into one list.
///
/// A list of version
internal static List GetAllVersionsFromGallery(string moduleName, string psRepository)
diff --git a/tools/VersionController/Program.cs b/tools/VersionController/Program.cs
index c7f6a778fd2b..2103a9741438 100644
--- a/tools/VersionController/Program.cs
+++ b/tools/VersionController/Program.cs
@@ -165,36 +165,21 @@ private static void BumpVersions()
{
powershell.AddScript("Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process;");
powershell.AddScript("Register-PackageSource -Name PSGallery -Location https://www.powershellgallery.com/api/v2 -ProviderName PowerShellGet");
- powershell.AddScript("Register-PackageSource -Name TestGallery -Location https://www.poshtestgallery.com/api/v2 -ProviderName PowerShellGet");
powershell.AddScript("Get-PSRepository");
var repositories = powershell.Invoke();
string psgallery = null;
- string testgallery = null;
foreach (var repo in repositories)
{
if ("https://www.powershellgallery.com/api/v2".Equals(repo.Properties["SourceLocation"]?.Value))
{
psgallery = repo.Properties["Name"]?.Value?.ToString();
}
- if ("https://www.poshtestgallery.com/api/v2".Equals(repo.Properties["SourceLocation"]?.Value))
- {
- testgallery = repo.Properties["Name"]?.Value?.ToString();
- }
}
if (psgallery == null)
{
throw new Exception("Cannot calculate module version because PSGallery is not available.");
}
targetRepositories = psgallery;
- if (testgallery == null)
- {
- Console.WriteLine("Warning: Cannot calculate module version precisely because TestGallery is not available.");
- }
- else
- {
- targetRepositories += $",{testgallery}";
- }
-
}
var changedModules = new List();