50 lines
1.4 KiB
PowerShell
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
|
|
}
|
|
}
|
|
}
|