From 23b0299b2af889fab8a640597cf679b49086caee Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Wed, 26 Feb 2020 15:20:01 -0800 Subject: [PATCH] Ensure the man gzip has the correct name for LTS release (#11956) --- tools/packaging/packaging.psm1 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 751f4a8da5..62d9cb758f 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -842,7 +842,7 @@ function New-UnixPackage { } # Generate gzip of man file - $ManGzipInfo = New-ManGzip -IsPreview:$IsPreview + $ManGzipInfo = New-ManGzip -IsPreview:$IsPreview -IsLTS:$LTS # Change permissions for packaging Write-Log "Setting permissions..." @@ -1376,15 +1376,20 @@ function New-ManGzip { param( [switch] - $IsPreview + $IsPreview, + + [switch] + $IsLTS ) Write-Log "Creating man gz..." # run ronn to convert man page to roff $RonnFile = "$RepoRoot/assets/pwsh.1.ronn" - if ($IsPreview.IsPresent) + + if ($IsPreview.IsPresent -or $IsLTS.IsPresent) { - $newRonnFile = $RonnFile -replace 'pwsh', 'pwsh-preview' + $prodName = if ($IsLTS) { 'pwsh-lts' } else { 'pwsh-preview' } + $newRonnFile = $RonnFile -replace 'pwsh', $prodName Copy-Item -Path $RonnFile -Destination $newRonnFile -force $RonnFile = $newRonnFile }