OCram85/DroneHelper
OCram85
/
DroneHelper
Archived
1
0
Fork 0
This repository has been archived on 2023-10-10. You can view files and clone it, but cannot push or open issues or pull requests.
DroneHelper/src/Docs/Update-Docs.ps1

50 lines
1.4 KiB
PowerShell

function Update-Docs {
<#
.SYNOPSIS
Publishes powershell module to internal Nexus repository.
.DESCRIPTION
This Cmdlet is used to publish the module via Drone pipeline.
.INPUTS
[None] No pipeline input.
.OUTPUTS
[None] No pipeline output.
.EXAMPLE
Update-Docs
#>
[CmdletBinding()]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSUseShouldProcessForStateChangingFunctions',
'',
Justification = 'Underlying platyPS can not be mocked.'
)]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSUseSingularNouns',
'',
Justification = 'New-Doc already in use by other popular modules.'
)]
param ()
process {
$Repo = Get-RepoPath
Import-Module $Repo.Src.Manifest.Item.FullName -Global -Force
Import-Module -Name 'platyPS'
$MarkdownParams = @{
Path = $Repo.Docs.Path
RefreshModulePage = $true
ModulePagePath = $Repo.Docs.ModulePagePath
Force = $true
}
Update-MarkdownHelpModule @MarkdownParams
$Docs = Get-Item -Path $Repo.Docs.MarkdownFilter
foreach ($Doc in $Docs) {
Write-Verbose -Message ('Converting {0}' -f $Doc.FullName)
Set-EOL -Path $Doc
}
}
}