Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tools/packaging/packaging.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
'New-ILNugetPackageFromSource'
'New-PSBuildZip'
'New-PSSignedBuildZip'
'Publish-NugetToMyGet'
'Start-PSPackage'
'Test-PackageManifest'
'Update-PSSignedBuildFolder'
Expand Down
36 changes: 0 additions & 36 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3559,42 +3559,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)]
Expand Down
Loading