Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down Expand Up @@ -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
}
Expand Down