@@ -50,7 +50,7 @@ function Start-PSPackage {
50
50
[string ]$Name = " powershell" ,
51
51
52
52
# 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" )]
54
54
[string []]$Type ,
55
55
56
56
# Generate windows downlevel package
@@ -321,18 +321,18 @@ function Start-PSPackage {
321
321
if (-not $Type ) {
322
322
$Type = if ($Environment.IsLinux ) {
323
323
if ($Environment.LinuxInfo.ID -match " ubuntu" ) {
324
- " deb" , " nupkg " , " tar"
324
+ " deb" , " tar"
325
325
} elseif ($Environment.IsRedHatFamily ) {
326
- " rpm" , " nupkg "
326
+ " rpm"
327
327
} elseif ($Environment.IsSUSEFamily ) {
328
- " rpm" , " nupkg "
328
+ " rpm"
329
329
} else {
330
330
throw " Building packages for $ ( $Environment.LinuxInfo.PRETTY_NAME ) is unsupported!"
331
331
}
332
332
} elseif ($Environment.IsMacOS ) {
333
- " osxpkg" , " nupkg " , " tar"
333
+ " osxpkg" , " tar"
334
334
} elseif ($Environment.IsWindows ) {
335
- " msi" , " nupkg " , " msix"
335
+ " msi" , " msix"
336
336
}
337
337
Write-Warning " -Type was not specified, continuing with $Type !"
338
338
}
@@ -521,20 +521,6 @@ function Start-PSPackage {
521
521
New-MSIXPackage @Arguments
522
522
}
523
523
}
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
- }
538
524
" tar" {
539
525
$Arguments = @ {
540
526
PackageSourcePath = $Source
@@ -3051,95 +3037,6 @@ function Publish-NugetToMyGet
3051
3037
}
3052
3038
}
3053
3039
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
-
3143
3040
function New-SubFolder
3144
3041
{
3145
3042
[CmdletBinding (SupportsShouldProcess = $true )]
0 commit comments