Skip to content

Commit 89a2d83

Browse files
TravisEz13adityapatwardhan
authored andcommitted
Checkin generated manpage (PowerShell#24423)
* checkin generataed manpage * move ronn file into new folder * update build and release to use new asset * add a minimal macos packaging test * add correct dependency for the macos packaging stage * fix packaging error * remove removing files
1 parent ff03706 commit 89a2d83

File tree

5 files changed

+36
-21
lines changed

5 files changed

+36
-21
lines changed

.vsts-ci/mac.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,20 @@ stages:
9696
parameters:
9797
pool: macOS-latest
9898

99+
- stage: PackageMac
100+
dependsOn: ['BuildMac']
101+
displayName: Package macOS (bootstrap only)
102+
jobs:
103+
- job: macos_packaging
104+
pool:
105+
vmImage: macOS-latest
106+
107+
displayName: macOS packaging (bootstrap only)
108+
steps:
109+
- checkout: self
110+
clean: true
111+
- pwsh: |
112+
import-module ./build.psm1
113+
start-psbootstrap -package
114+
displayName: Bootstrap packaging
115+
condition: succeededOrFailed()

assets/manpage/pwsh.1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.\" generated with Ronn/v0.7.3
2+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
3+
.
4+
.TH "PWSH" "1" "October 2023" "" ""
5+
.
6+
.SH "NAME"
7+
\fBpwsh\fR \- PowerShell command\-line shell and \.NET REPL
8+
.
9+
.SH "SYNOPSIS"
10+
\fBpwsh\fR [\fB\-Login\fR] [ [\fB\-File\fR] \fIfilePath\fR [args] ] [\fB\-Command\fR { \- | \fIscript\-block\fR [\fB\-args\fR \fIarg\-array\fR] | \fIstring\fR [\fICommandParameters\fR] } ] [\fB\-ConfigurationFile\fR \fIfilePath\fR] [\fB\-ConfigurationName\fR \fIstring\fR] [\fB\-CustomPipeName\fR \fIstring\fR] [\fB\-EncodedArguments\fR \fIBase64EncodedArguments\fR] [\fB\-EncodedCommand\fR \fIBase64EncodedCommand\fR] [\fB\-ExecutionPolicy\fR \fIExecutionPolicy\fR] [\fB\-Help\fR] [\fB\-InputFormat\fR {Text | XML}] [\fB\-Interactive\fR] [\fB\-MTA\fR] [\fB\-NoExit\fR] [\fB\-NoLogo\fR] [\fB\-NonInteractive\fR] [\fB\-NoProfile\fR] [\fB\-NoProfileLoadTime\fR] [\fB\-OutputFormat\fR {Text | XML}] [\fB\-SettingsFile\fR \fIfilePath\fR] [\fB\-SSHServerMode\fR] [\fB\-STA\fR] [\fB\-Version\fR] [\fB\-WindowStyle\fR
File renamed without changes.

build.psm1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2333,12 +2333,11 @@ function Start-PSBootstrap {
23332333
}
23342334
}
23352335

2336-
# Install [fpm](https://github.com/jordansissel/fpm) and [ronn](https://github.com/rtomayko/ronn)
2336+
# Install [fpm](https://github.com/jordansissel/fpm)
23372337
if ($Package) {
23382338
Install-GlobalGem -Sudo $sudo -GemName "dotenv" -GemVersion "2.8.1"
23392339
Install-GlobalGem -Sudo $sudo -GemName "ffi" -GemVersion "1.16.3"
23402340
Install-GlobalGem -Sudo $sudo -GemName "fpm" -GemVersion "1.15.1"
2341-
Install-GlobalGem -Sudo $sudo -GemName "ronn" -GemVersion "0.7.3"
23422341
Install-GlobalGem -Sudo $sudo -GemName "rexml" -GemVersion "3.2.5"
23432342
}
23442343
}

tools/packaging/packaging.psm1

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ function Get-PackageDependencies
16361636

16371637
function Test-Dependencies
16381638
{
1639-
foreach ($Dependency in "fpm", "ronn") {
1639+
foreach ($Dependency in "fpm") {
16401640
if (!(precheck $Dependency "Package dependency '$Dependency' not found. Run Start-PSBootstrap -Package")) {
16411641
# These tools are not added to the path automatically on OpenSUSE 13.2
16421642
# try adding them to the path and re-tesing first
@@ -1714,26 +1714,15 @@ function New-ManGzip
17141714
)
17151715

17161716
Write-Log "Creating man gz..."
1717-
# run ronn to convert man page to roff
1718-
$RonnFile = "$RepoRoot/assets/pwsh.1.ronn"
17191717

1720-
if ($IsPreview.IsPresent -or $IsLTS.IsPresent)
1721-
{
1722-
$prodName = if ($IsLTS) { 'pwsh-lts' } else { 'pwsh-preview' }
1723-
$newRonnFile = $RonnFile -replace 'pwsh', $prodName
1724-
Copy-Item -Path $RonnFile -Destination $newRonnFile -Force
1725-
$RonnFile = $newRonnFile
1726-
}
1727-
1728-
$RoffFile = $RonnFile -replace "\.ronn$"
1718+
# run roff to convert man page to roff
1719+
$RoffFile = "$RepoRoot/assets/manpage/pwsh.1"
17291720

1730-
# Run ronn on assets file
1731-
Write-Log "Creating man gz - running ronn..."
1732-
Start-NativeExecution { ronn --roff $RonnFile }
1733-
1734-
if ($IsPreview.IsPresent)
1735-
{
1736-
Remove-Item $RonnFile
1721+
if ($IsPreview.IsPresent -or $IsLTS.IsPresent) {
1722+
$prodName = if ($IsLTS) { 'pwsh-lts' } else { 'pwsh-preview' }
1723+
$newRoffFile = $RoffFile -replace 'pwsh', $prodName
1724+
Copy-Item -Path $RoffFile -Destination $newRoffFile -Force -Verbose
1725+
$RoffFile = $newRoffFile
17371726
}
17381727

17391728
# gzip in assets directory

0 commit comments

Comments
 (0)