Remove the unused Publish-NugetToMyGet command from packaging module (#27403)

This commit is contained in:
Dongbo Wang
2026-06-02 12:27:13 -07:00
committed by GitHub
parent 715d0f5ca7
commit 96ab22e281
2 changed files with 0 additions and 37 deletions
-1
View File
@@ -18,7 +18,6 @@
'New-ILNugetPackageFromSource'
'New-PSBuildZip'
'New-PSSignedBuildZip'
'Publish-NugetToMyGet'
'Start-PSPackage'
'Test-PackageManifest'
'Update-PSSignedBuildFolder'
-36
View File
@@ -3602,42 +3602,6 @@ function New-NugetPackage
Pop-Location
}
<#
.SYNOPSIS
Publish the specified Nuget Package to MyGet feed.
.DESCRIPTION
The specified nuget package is published to the powershell.myget.org/powershell-core feed.
.PARAMETER PackagePath
Path to the NuGet Package.
.PARAMETER ApiKey
API key for powershell.myget.org
#>
function Publish-NugetToMyGet
{
param(
[Parameter(Mandatory = $true)]
[string] $PackagePath,
[Parameter(Mandatory = $true)]
[string] $ApiKey
)
$nuget = Get-Command -Type Application nuget -ErrorAction SilentlyContinue
if ($null -eq $nuget)
{
throw 'nuget application is not available in PATH'
}
Get-ChildItem $PackagePath | ForEach-Object {
Write-Log "Pushing $_ to PowerShell Myget"
Start-NativeExecution { nuget push $_.FullName -Source 'https://powershell.myget.org/F/powershell-core/api/v2/package' -ApiKey $ApiKey } > $null
}
}
function New-SubFolder
{
[CmdletBinding(SupportsShouldProcess=$true)]