mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 09:43:57 +08:00
Checkin generated manpage (#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
This commit is contained in:
parent
4f7819d143
commit
ac8ab0db22
@ -96,3 +96,20 @@ stages:
|
|||||||
parameters:
|
parameters:
|
||||||
pool: macOS-latest
|
pool: macOS-latest
|
||||||
|
|
||||||
|
- stage: PackageMac
|
||||||
|
dependsOn: ['BuildMac']
|
||||||
|
displayName: Package macOS (bootstrap only)
|
||||||
|
jobs:
|
||||||
|
- job: macos_packaging
|
||||||
|
pool:
|
||||||
|
vmImage: macOS-latest
|
||||||
|
|
||||||
|
displayName: macOS packaging (bootstrap only)
|
||||||
|
steps:
|
||||||
|
- checkout: self
|
||||||
|
clean: true
|
||||||
|
- pwsh: |
|
||||||
|
import-module ./build.psm1
|
||||||
|
start-psbootstrap -package
|
||||||
|
displayName: Bootstrap packaging
|
||||||
|
condition: succeededOrFailed()
|
||||||
|
10
assets/manpage/pwsh.1
Normal file
10
assets/manpage/pwsh.1
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
.\" generated with Ronn/v0.7.3
|
||||||
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
|
.
|
||||||
|
.TH "PWSH" "1" "October 2023" "" ""
|
||||||
|
.
|
||||||
|
.SH "NAME"
|
||||||
|
\fBpwsh\fR \- PowerShell command\-line shell and \.NET REPL
|
||||||
|
.
|
||||||
|
.SH "SYNOPSIS"
|
||||||
|
\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
|
@ -2333,12 +2333,11 @@ function Start-PSBootstrap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install [fpm](https://github.com/jordansissel/fpm) and [ronn](https://github.com/rtomayko/ronn)
|
# Install [fpm](https://github.com/jordansissel/fpm)
|
||||||
if ($Package) {
|
if ($Package) {
|
||||||
Install-GlobalGem -Sudo $sudo -GemName "dotenv" -GemVersion "2.8.1"
|
Install-GlobalGem -Sudo $sudo -GemName "dotenv" -GemVersion "2.8.1"
|
||||||
Install-GlobalGem -Sudo $sudo -GemName "ffi" -GemVersion "1.16.3"
|
Install-GlobalGem -Sudo $sudo -GemName "ffi" -GemVersion "1.16.3"
|
||||||
Install-GlobalGem -Sudo $sudo -GemName "fpm" -GemVersion "1.15.1"
|
Install-GlobalGem -Sudo $sudo -GemName "fpm" -GemVersion "1.15.1"
|
||||||
Install-GlobalGem -Sudo $sudo -GemName "ronn" -GemVersion "0.7.3"
|
|
||||||
Install-GlobalGem -Sudo $sudo -GemName "rexml" -GemVersion "3.2.5"
|
Install-GlobalGem -Sudo $sudo -GemName "rexml" -GemVersion "3.2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1636,7 +1636,7 @@ function Get-PackageDependencies
|
|||||||
|
|
||||||
function Test-Dependencies
|
function Test-Dependencies
|
||||||
{
|
{
|
||||||
foreach ($Dependency in "fpm", "ronn") {
|
foreach ($Dependency in "fpm") {
|
||||||
if (!(precheck $Dependency "Package dependency '$Dependency' not found. Run Start-PSBootstrap -Package")) {
|
if (!(precheck $Dependency "Package dependency '$Dependency' not found. Run Start-PSBootstrap -Package")) {
|
||||||
# These tools are not added to the path automatically on OpenSUSE 13.2
|
# These tools are not added to the path automatically on OpenSUSE 13.2
|
||||||
# try adding them to the path and re-tesing first
|
# try adding them to the path and re-tesing first
|
||||||
@ -1714,26 +1714,15 @@ function New-ManGzip
|
|||||||
)
|
)
|
||||||
|
|
||||||
Write-Log "Creating man gz..."
|
Write-Log "Creating man gz..."
|
||||||
# run ronn to convert man page to roff
|
|
||||||
$RonnFile = "$RepoRoot/assets/pwsh.1.ronn"
|
|
||||||
|
|
||||||
if ($IsPreview.IsPresent -or $IsLTS.IsPresent)
|
# run roff to convert man page to roff
|
||||||
{
|
$RoffFile = "$RepoRoot/assets/manpage/pwsh.1"
|
||||||
|
|
||||||
|
if ($IsPreview.IsPresent -or $IsLTS.IsPresent) {
|
||||||
$prodName = if ($IsLTS) { 'pwsh-lts' } else { 'pwsh-preview' }
|
$prodName = if ($IsLTS) { 'pwsh-lts' } else { 'pwsh-preview' }
|
||||||
$newRonnFile = $RonnFile -replace 'pwsh', $prodName
|
$newRoffFile = $RoffFile -replace 'pwsh', $prodName
|
||||||
Copy-Item -Path $RonnFile -Destination $newRonnFile -Force
|
Copy-Item -Path $RoffFile -Destination $newRoffFile -Force -Verbose
|
||||||
$RonnFile = $newRonnFile
|
$RoffFile = $newRoffFile
|
||||||
}
|
|
||||||
|
|
||||||
$RoffFile = $RonnFile -replace "\.ronn$"
|
|
||||||
|
|
||||||
# Run ronn on assets file
|
|
||||||
Write-Log "Creating man gz - running ronn..."
|
|
||||||
Start-NativeExecution { ronn --roff $RonnFile }
|
|
||||||
|
|
||||||
if ($IsPreview.IsPresent)
|
|
||||||
{
|
|
||||||
Remove-Item $RonnFile
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# gzip in assets directory
|
# gzip in assets directory
|
||||||
|
Loading…
Reference in New Issue
Block a user