From 434292226860200c56ac7f892da659dd16ca5e46 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 14 Jun 2018 10:01:09 -0700 Subject: [PATCH] make sure all references to the Pkg ID for previews packages is powershell-preview (#7066) * make sure all references to the Pkg ID for previews are com.microsoft.powershell-preview fixes #7065 --- tools/packaging/packaging.psm1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 31f5afbb81..867ff105ba 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -618,7 +618,7 @@ function New-UnixPackage { $IsPreview = Test-IsPreview -Version $Version # Preview versions have preview in the name - $Name = if ($IsPreview -and $Environment.IsLinux) { "powershell-preview" } else { "powershell" } + $Name = if ($IsPreview) { "powershell-preview" } else { "powershell" } # Verify dependencies are installed and in the path Test-Dependencies @@ -804,7 +804,9 @@ function New-MacOsDistributionPackage # Add the OS information to the macOS package file name. $packageExt = [System.IO.Path]::GetExtension($FpmPackage.Name) - $packageNameWithoutExt = [System.IO.Path]::GetFileNameWithoutExtension($FpmPackage.Name) + + # get the package name from fpm without the extension, but replace powershell-preview at the beginning of the name with powershell. + $packageNameWithoutExt = [System.IO.Path]::GetFileNameWithoutExtension($FpmPackage.Name) -replace '^powershell\-preview' , 'powershell' $newPackageName = "{0}-{1}{2}" -f $packageNameWithoutExt, $script:Options.Runtime, $packageExt $newPackagePath = Join-Path $FpmPackage.DirectoryName $newPackageName