Skip to content

Commit

Permalink
(maint) Update documentation generation script
Browse files Browse the repository at this point in the history
When working on this, some irregularities were noted with the generation
of the documentation, so these changes avoid the issues that arose.
  • Loading branch information
vexx32 committed Oct 4, 2024
1 parent c0030e6 commit ce9d045
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions update-cmdlet-documentation.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<#
# PowerShell Core generates additional documentation that may not be correct for running under Windows PowerShell.
#Requires -PSEdition Desktop
<#
.SYNOPSIS
Generates Markdown documentation for the Chocolatey.PowerShell portion of Chocolatey's installer module commands.
Expand Down Expand Up @@ -85,12 +87,12 @@ if (-not (Get-Module Chocolatey.PowerShell)) {
throw "The Chocolatey.PowerShell module was not able to be loaded, exiting documentation generation."
}

$newOrUpdatedFiles = [System.Collections.Generic.HashSet[System.IO.FileSystemInfo]] @(
$newOrUpdatedFiles = @(
if ($NewCommand) {
New-MarkdownHelp -Command $NewCommand -OutputFolder "$PSScriptRoot\docs" -ExcludeDontShow
New-MarkdownHelp -Command $NewCommand -OutputFolder $documentationPath -ExcludeDontShow
}

Update-MarkdownHelp -Path $documentationPath -ExcludeDontShow
Update-MarkdownHelp -Path $documentationPath -ExcludeDontShow | Where-Object BaseName -ne $NewCommand
)

$incompleteFiles = $newOrUpdatedFiles | Select-String '\{\{[^}]+}}' | Select-Object -ExpandProperty Path
Expand Down

0 comments on commit ce9d045

Please sign in to comment.