diff --git a/tools/ci.psm1 b/tools/ci.psm1
index 751b5fd414..37d9a06ac6 100644
--- a/tools/ci.psm1
+++ b/tools/ci.psm1
@@ -537,7 +537,7 @@ function Invoke-CIFinish
switch -regex ($Runtime){
default {
$runPackageTest = $true
- $packageTypes = 'msi', 'nupkg', 'zip', 'zip-pdb', 'msix'
+ $packageTypes = 'msi', 'zip', 'zip-pdb', 'msix'
}
'win-arm.*' {
$runPackageTest = $false
@@ -591,14 +591,6 @@ function Invoke-CIFinish
throw "Packaging tests failed ($($packagingTestResult.FailedCount) failed/$($packagingTestResult.PassedCount) passed)"
}
}
-
- # only publish assembly nuget packages if it is a daily build and tests passed
- if (Test-DailyBuild) {
- $nugetArtifacts = Get-ChildItem $PSScriptRoot\packaging\nugetOutput -ErrorAction SilentlyContinue -Filter *.nupkg | Select-Object -ExpandProperty FullName
- if ($nugetArtifacts) {
- $artifacts.AddRange(@($nugetArtifacts))
- }
- }
}
} catch {
Get-Error -InputObject $_
diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1
index 209d8fc49f..07c43c2180 100644
--- a/tools/packaging/packaging.psm1
+++ b/tools/packaging/packaging.psm1
@@ -50,7 +50,7 @@ function Start-PSPackage {
[string]$Name = "powershell",
# Ubuntu, CentOS, Fedora, macOS, and Windows packages are supported
- [ValidateSet("msix", "deb", "osxpkg", "rpm", "rpm-fxdependent", "rpm-fxdependent-arm64", "msi", "zip", "zip-pdb", "nupkg", "tar", "tar-arm", "tar-arm64", "tar-alpine", "fxdependent", "fxdependent-win-desktop", "min-size", "tar-alpine-fxdependent")]
+ [ValidateSet("msix", "deb", "osxpkg", "rpm", "rpm-fxdependent", "rpm-fxdependent-arm64", "msi", "zip", "zip-pdb", "tar", "tar-arm", "tar-arm64", "tar-alpine", "fxdependent", "fxdependent-win-desktop", "min-size", "tar-alpine-fxdependent")]
[string[]]$Type,
# Generate windows downlevel package
@@ -321,18 +321,18 @@ function Start-PSPackage {
if (-not $Type) {
$Type = if ($Environment.IsLinux) {
if ($Environment.LinuxInfo.ID -match "ubuntu") {
- "deb", "nupkg", "tar"
+ "deb", "tar"
} elseif ($Environment.IsRedHatFamily) {
- "rpm", "nupkg"
+ "rpm"
} elseif ($Environment.IsSUSEFamily) {
- "rpm", "nupkg"
+ "rpm"
} else {
throw "Building packages for $($Environment.LinuxInfo.PRETTY_NAME) is unsupported!"
}
} elseif ($Environment.IsMacOS) {
- "osxpkg", "nupkg", "tar"
+ "osxpkg", "tar"
} elseif ($Environment.IsWindows) {
- "msi", "nupkg", "msix"
+ "msi", "msix"
}
Write-Warning "-Type was not specified, continuing with $Type!"
}
@@ -521,20 +521,6 @@ function Start-PSPackage {
New-MSIXPackage @Arguments
}
}
- 'nupkg' {
- $Arguments = @{
- PackageNameSuffix = $NameSuffix
- PackageSourcePath = $Source
- PackageVersion = $Version
- PackageRuntime = $Runtime
- PackageConfiguration = $Configuration
- Force = $Force
- }
-
- if ($PSCmdlet.ShouldProcess("Create NuPkg Package")) {
- New-NugetContentPackage @Arguments
- }
- }
"tar" {
$Arguments = @{
PackageSourcePath = $Source
@@ -3051,95 +3037,6 @@ function Publish-NugetToMyGet
}
}
-<#
-.SYNOPSIS
-The function creates a nuget package for daily feed.
-
-.DESCRIPTION
-The nuget package created is a content package and has all the binaries laid out in a flat structure.
-This package is used by install-powershell.ps1
-#>
-function New-NugetContentPackage
-{
- [CmdletBinding(SupportsShouldProcess=$true)]
- param (
-
- # Name of the Product
- [ValidateNotNullOrEmpty()]
- [string] $PackageName = 'powershell',
-
- # Suffix of the Name
- [string] $PackageNameSuffix,
-
- # Version of the Product
- [Parameter(Mandatory = $true)]
- [ValidateNotNullOrEmpty()]
- [string] $PackageVersion,
-
- # Runtime of the Product
- [Parameter(Mandatory = $true)]
- [ValidateNotNullOrEmpty()]
- [string] $PackageRuntime,
-
- # Configuration of the Product
- [Parameter(Mandatory = $true)]
- [ValidateNotNullOrEmpty()]
- [string] $PackageConfiguration,
-
- # Source Path to the Product Files - required to package the contents into an Zip
- [Parameter(Mandatory = $true)]
- [ValidateNotNullOrEmpty()]
- [string] $PackageSourcePath,
-
- [Switch]
- $Force
- )
-
- Write-Log "PackageVersion: $PackageVersion"
- $nugetSemanticVersion = Get-NugetSemanticVersion -Version $PackageVersion
- Write-Log "nugetSemanticVersion: $nugetSemanticVersion"
-
- $nugetFolder = New-SubFolder -Path $PSScriptRoot -ChildPath 'nugetOutput' -Clean
-
- $nuspecPackageName = $PackageName
- if ($PackageNameSuffix)
- {
- $nuspecPackageName += '-' + $PackageNameSuffix
- }
-
- # Setup staging directory so we don't change the original source directory
- $stagingRoot = New-SubFolder -Path $PSScriptRoot -ChildPath 'nugetStaging' -Clean
- $contentFolder = Join-Path -Path $stagingRoot -ChildPath 'content'
- if ($PSCmdlet.ShouldProcess("Create staging folder")) {
- New-StagingFolder -StagingPath $contentFolder -PackageSourcePath $PackageSourcePath
- }
-
- $projectFolder = Join-Path $PSScriptRoot 'projects/nuget'
-
- $arguments = @('pack')
- $arguments += @('--output',$nugetFolder)
- $arguments += @('--configuration',$PackageConfiguration)
- $arguments += "/p:StagingPath=$stagingRoot"
- $arguments += "/p:RID=$PackageRuntime"
- $arguments += "/p:SemVer=$nugetSemanticVersion"
- $arguments += "/p:PackageName=$nuspecPackageName"
- $arguments += $projectFolder
-
- Write-Log "Running dotnet $arguments"
- Write-Log "Use -verbose to see output..."
- Start-NativeExecution -sb {dotnet $arguments} | ForEach-Object {Write-Verbose $_}
-
- $nupkgFile = "${nugetFolder}\${nuspecPackageName}-${packageRuntime}.${nugetSemanticVersion}.nupkg"
- if (Test-Path $nupkgFile)
- {
- Get-Item $nupkgFile
- }
- else
- {
- throw "Failed to create $nupkgFile"
- }
-}
-
function New-SubFolder
{
[CmdletBinding(SupportsShouldProcess=$true)]
diff --git a/tools/packaging/projects/nuget/package.csproj b/tools/packaging/projects/nuget/package.csproj
deleted file mode 100644
index 390283c5ef..0000000000
--- a/tools/packaging/projects/nuget/package.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- NotUsed
- PowerShell nuget package with .NET CLI host including everything needed to run it.
- powershell.nuspec
- runtime=$(RID);version=$(SemVer);PackageName=$(PackageName)
- $(StagingPath)
- True
- net8.0
-
-
diff --git a/tools/packaging/projects/nuget/powershell.nuspec b/tools/packaging/projects/nuget/powershell.nuspec
deleted file mode 100644
index 5c191e911e..0000000000
--- a/tools/packaging/projects/nuget/powershell.nuspec
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- $PackageName$-$runtime$
- $version$
- PowerShell for $runtime$
- PowerShell
- PowerShell
- false
- MIT
- https://github.com/powershell/powershell
- https://github.com/PowerShell/PowerShell/blob/master/assets/Powershell_64.png
- This package contains PowerShell for $runtime$.
- Copyright (c) Microsoft Corporation.
- PowerShell
-
-
-
-
-
-