Skip to content

Commit b45be5c

Browse files
Cleanup unused csproj (#23951) (#24146)
Co-authored-by: Travis Plunk <[email protected]>
1 parent 3599491 commit b45be5c

File tree

4 files changed

+7
-155
lines changed

4 files changed

+7
-155
lines changed

tools/ci.psm1

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ function Invoke-CIFinish
537537
switch -regex ($Runtime){
538538
default {
539539
$runPackageTest = $true
540-
$packageTypes = 'msi', 'nupkg', 'zip', 'zip-pdb', 'msix'
540+
$packageTypes = 'msi', 'zip', 'zip-pdb', 'msix'
541541
}
542542
'win-arm.*' {
543543
$runPackageTest = $false
@@ -591,14 +591,6 @@ function Invoke-CIFinish
591591
throw "Packaging tests failed ($($packagingTestResult.FailedCount) failed/$($packagingTestResult.PassedCount) passed)"
592592
}
593593
}
594-
595-
# only publish assembly nuget packages if it is a daily build and tests passed
596-
if (Test-DailyBuild) {
597-
$nugetArtifacts = Get-ChildItem $PSScriptRoot\packaging\nugetOutput -ErrorAction SilentlyContinue -Filter *.nupkg | Select-Object -ExpandProperty FullName
598-
if ($nugetArtifacts) {
599-
$artifacts.AddRange(@($nugetArtifacts))
600-
}
601-
}
602594
}
603595
} catch {
604596
Get-Error -InputObject $_

tools/packaging/packaging.psm1

Lines changed: 6 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function Start-PSPackage {
5050
[string]$Name = "powershell",
5151

5252
# Ubuntu, CentOS, Fedora, macOS, and Windows packages are supported
53-
[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")]
53+
[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")]
5454
[string[]]$Type,
5555

5656
# Generate windows downlevel package
@@ -321,18 +321,18 @@ function Start-PSPackage {
321321
if (-not $Type) {
322322
$Type = if ($Environment.IsLinux) {
323323
if ($Environment.LinuxInfo.ID -match "ubuntu") {
324-
"deb", "nupkg", "tar"
324+
"deb", "tar"
325325
} elseif ($Environment.IsRedHatFamily) {
326-
"rpm", "nupkg"
326+
"rpm"
327327
} elseif ($Environment.IsSUSEFamily) {
328-
"rpm", "nupkg"
328+
"rpm"
329329
} else {
330330
throw "Building packages for $($Environment.LinuxInfo.PRETTY_NAME) is unsupported!"
331331
}
332332
} elseif ($Environment.IsMacOS) {
333-
"osxpkg", "nupkg", "tar"
333+
"osxpkg", "tar"
334334
} elseif ($Environment.IsWindows) {
335-
"msi", "nupkg", "msix"
335+
"msi", "msix"
336336
}
337337
Write-Warning "-Type was not specified, continuing with $Type!"
338338
}
@@ -521,20 +521,6 @@ function Start-PSPackage {
521521
New-MSIXPackage @Arguments
522522
}
523523
}
524-
'nupkg' {
525-
$Arguments = @{
526-
PackageNameSuffix = $NameSuffix
527-
PackageSourcePath = $Source
528-
PackageVersion = $Version
529-
PackageRuntime = $Runtime
530-
PackageConfiguration = $Configuration
531-
Force = $Force
532-
}
533-
534-
if ($PSCmdlet.ShouldProcess("Create NuPkg Package")) {
535-
New-NugetContentPackage @Arguments
536-
}
537-
}
538524
"tar" {
539525
$Arguments = @{
540526
PackageSourcePath = $Source
@@ -3051,95 +3037,6 @@ function Publish-NugetToMyGet
30513037
}
30523038
}
30533039

3054-
<#
3055-
.SYNOPSIS
3056-
The function creates a nuget package for daily feed.
3057-
3058-
.DESCRIPTION
3059-
The nuget package created is a content package and has all the binaries laid out in a flat structure.
3060-
This package is used by install-powershell.ps1
3061-
#>
3062-
function New-NugetContentPackage
3063-
{
3064-
[CmdletBinding(SupportsShouldProcess=$true)]
3065-
param (
3066-
3067-
# Name of the Product
3068-
[ValidateNotNullOrEmpty()]
3069-
[string] $PackageName = 'powershell',
3070-
3071-
# Suffix of the Name
3072-
[string] $PackageNameSuffix,
3073-
3074-
# Version of the Product
3075-
[Parameter(Mandatory = $true)]
3076-
[ValidateNotNullOrEmpty()]
3077-
[string] $PackageVersion,
3078-
3079-
# Runtime of the Product
3080-
[Parameter(Mandatory = $true)]
3081-
[ValidateNotNullOrEmpty()]
3082-
[string] $PackageRuntime,
3083-
3084-
# Configuration of the Product
3085-
[Parameter(Mandatory = $true)]
3086-
[ValidateNotNullOrEmpty()]
3087-
[string] $PackageConfiguration,
3088-
3089-
# Source Path to the Product Files - required to package the contents into an Zip
3090-
[Parameter(Mandatory = $true)]
3091-
[ValidateNotNullOrEmpty()]
3092-
[string] $PackageSourcePath,
3093-
3094-
[Switch]
3095-
$Force
3096-
)
3097-
3098-
Write-Log "PackageVersion: $PackageVersion"
3099-
$nugetSemanticVersion = Get-NugetSemanticVersion -Version $PackageVersion
3100-
Write-Log "nugetSemanticVersion: $nugetSemanticVersion"
3101-
3102-
$nugetFolder = New-SubFolder -Path $PSScriptRoot -ChildPath 'nugetOutput' -Clean
3103-
3104-
$nuspecPackageName = $PackageName
3105-
if ($PackageNameSuffix)
3106-
{
3107-
$nuspecPackageName += '-' + $PackageNameSuffix
3108-
}
3109-
3110-
# Setup staging directory so we don't change the original source directory
3111-
$stagingRoot = New-SubFolder -Path $PSScriptRoot -ChildPath 'nugetStaging' -Clean
3112-
$contentFolder = Join-Path -Path $stagingRoot -ChildPath 'content'
3113-
if ($PSCmdlet.ShouldProcess("Create staging folder")) {
3114-
New-StagingFolder -StagingPath $contentFolder -PackageSourcePath $PackageSourcePath
3115-
}
3116-
3117-
$projectFolder = Join-Path $PSScriptRoot 'projects/nuget'
3118-
3119-
$arguments = @('pack')
3120-
$arguments += @('--output',$nugetFolder)
3121-
$arguments += @('--configuration',$PackageConfiguration)
3122-
$arguments += "/p:StagingPath=$stagingRoot"
3123-
$arguments += "/p:RID=$PackageRuntime"
3124-
$arguments += "/p:SemVer=$nugetSemanticVersion"
3125-
$arguments += "/p:PackageName=$nuspecPackageName"
3126-
$arguments += $projectFolder
3127-
3128-
Write-Log "Running dotnet $arguments"
3129-
Write-Log "Use -verbose to see output..."
3130-
Start-NativeExecution -sb {dotnet $arguments} | ForEach-Object {Write-Verbose $_}
3131-
3132-
$nupkgFile = "${nugetFolder}\${nuspecPackageName}-${packageRuntime}.${nugetSemanticVersion}.nupkg"
3133-
if (Test-Path $nupkgFile)
3134-
{
3135-
Get-Item $nupkgFile
3136-
}
3137-
else
3138-
{
3139-
throw "Failed to create $nupkgFile"
3140-
}
3141-
}
3142-
31433040
function New-SubFolder
31443041
{
31453042
[CmdletBinding(SupportsShouldProcess=$true)]

tools/packaging/projects/nuget/package.csproj

Lines changed: 0 additions & 16 deletions
This file was deleted.

tools/packaging/projects/nuget/powershell.nuspec

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)