Skip to content

Commit

Permalink
make sure all references to the Pkg ID for previews packages is power…
Browse files Browse the repository at this point in the history
…shell-preview (PowerShell#7066)

* make sure all references to the Pkg ID for previews are com.microsoft.powershell-preview
fixes PowerShell#7065
  • Loading branch information
TravisEz13 committed Jun 14, 2018
1 parent 79ae17a commit 4342922
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4342922

Please sign in to comment.