Skip to content

Commit 0cf4446

Browse files
author
Kapil Borle
committed
Modify buildDocs task
1 parent 9d8c3ad commit 0cf4446

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

.build.ps1

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,11 @@ task cleanModule -if (Test-Path $outPath) {
196196

197197
$docsPath = Join-Path $BuildRoot 'docs'
198198
$outputDocsPath = Join-Path $modulePath 'en-US'
199-
$bdInputs = {Get-ChildItem $docsPath -File -Recurse}
199+
$bdInputs = (Get-ChildItem $docsPath -File -Recurse)
200200
$bdOutputs = @(
201-
"$outputDocsPath/about_PSScriptAnalyzer.help.txt",
202-
"$outputDocsPath/Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml"
203-
)
204-
205-
# $buildDocsParams = @{
206-
# Inputs = (Get-ChildItem $docsPath -File -Recurse)
207-
# Outputs = @(
208-
# "$outputDocsPath/about_PSScriptAnalyzer.help.txt",
209-
# "$outputDocsPath/Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml"
210-
# )
211-
# }
201+
"$outputDocsPath/about_PSScriptAnalyzer.help.txt",
202+
"$outputDocsPath/Microsoft.Windows.PowerShell.ScriptAnalyzer.dll-Help.xml"
203+
)
212204

213205
task buildDocs -Inputs $bdInputs -Outputs $bdOutputs {
214206
# todo move common variables to script scope
@@ -219,12 +211,10 @@ task buildDocs -Inputs $bdInputs -Outputs $bdOutputs {
219211
Copy-Item -Path $docsPath\about_PSScriptAnalyzer.help.txt -Destination $outputDocsPath -Force
220212

221213
# Build documentation using platyPS
222-
if ((Get-Module PlatyPS -ListAvailable -Verbose:$verbosity) -eq $null) {
214+
if ((Get-Module PlatyPS -ListAvailable) -eq $null) {
223215
throw "Cannot find PlatyPS. Please install it from https://www.powershellgallery.com."
224216
}
225-
if ((Get-Module PlatyPS -Verbose:$verbosity) -eq $null) {
226-
Import-Module PlatyPS -Verbose:$verbosity
227-
}
217+
Import-Module PlatyPS
228218
if (-not (Test-Path $markdownDocsPath -Verbose:$verbosity)) {
229219
throw "Cannot find markdown documentation folder."
230220
}

0 commit comments

Comments
 (0)