Ensure the man gzip has the correct name for LTS release (#11956)
This commit is contained in:
parent
f587d6a796
commit
d9387c3e95
1 changed files with 9 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue