From ac8ab0db223fc35faa73b064044688041624d5b0 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 14 Oct 2024 12:16:10 -0700 Subject: [PATCH] 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 --- .vsts-ci/mac.yml | 17 +++++++++++++++++ assets/manpage/pwsh.1 | 10 ++++++++++ assets/{ => manpage}/pwsh.1.ronn | 0 build.psm1 | 3 +-- tools/packaging/packaging.psm1 | 27 ++++++++------------------- 5 files changed, 36 insertions(+), 21 deletions(-) create mode 100644 assets/manpage/pwsh.1 rename assets/{ => manpage}/pwsh.1.ronn (100%) diff --git a/.vsts-ci/mac.yml b/.vsts-ci/mac.yml index 9e297cf4ae..bfb0b3afd2 100644 --- a/.vsts-ci/mac.yml +++ b/.vsts-ci/mac.yml @@ -96,3 +96,20 @@ stages: parameters: 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() diff --git a/assets/manpage/pwsh.1 b/assets/manpage/pwsh.1 new file mode 100644 index 0000000000..14c191241a --- /dev/null +++ b/assets/manpage/pwsh.1 @@ -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 diff --git a/assets/pwsh.1.ronn b/assets/manpage/pwsh.1.ronn similarity index 100% rename from assets/pwsh.1.ronn rename to assets/manpage/pwsh.1.ronn diff --git a/build.psm1 b/build.psm1 index 2d03836771..7855e46ac1 100644 --- a/build.psm1 +++ b/build.psm1 @@ -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) { 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 "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" } } diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index de1eed04f9..e685c91b74 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -1636,7 +1636,7 @@ function Get-PackageDependencies function Test-Dependencies { - foreach ($Dependency in "fpm", "ronn") { + foreach ($Dependency in "fpm") { 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 # try adding them to the path and re-tesing first @@ -1714,26 +1714,15 @@ function New-ManGzip ) 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' } - $newRonnFile = $RonnFile -replace 'pwsh', $prodName - Copy-Item -Path $RonnFile -Destination $newRonnFile -Force - $RonnFile = $newRonnFile - } - - $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 + $newRoffFile = $RoffFile -replace 'pwsh', $prodName + Copy-Item -Path $RoffFile -Destination $newRoffFile -Force -Verbose + $RoffFile = $newRoffFile } # gzip in assets directory