Skip to content

Commit 9dfeb2f

Browse files
authored
Update glossaryUpdater.ps1
1 parent b6ae78a commit 9dfeb2f

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

docs/ci/glossaryUpdater.ps1

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ catch {
1313
throw
1414
}
1515

16-
'platyPS','PoshRSJob' | ForEach-Object {
16+
'platyPS' | ForEach-Object {
1717
Write-Host "[$_] Resolving module"
1818
Install-Module $_ -Repository PSGallery -Scope CurrentUser -ErrorAction SilentlyContinue
1919
Import-Module $_
@@ -35,13 +35,14 @@ Get-ChildItem "$($docsPath)/docs/glossary" -Exclude "index.md" | Remove-Item -Fo
3535

3636
$vsCommands = (Get-ChildItem "$($basePath)/VaporShell/Public" -Filter '*.ps1' -Recurse).BaseName
3737

38-
Write-Host -ForegroundColor Green "Starting runspaces to build the updated docs"
39-
$vsCommands | Start-RSJob -Name {$_} -ModulesToImport platyPS,"$basePath\BuildOutput\VaporShell" -VariablesToImport docsPath -ScriptBlock {
38+
Write-Host -ForegroundColor Green "Starting parallel processing to build the updated docs"
39+
$vsCommands | ForEach-Object -Parallel {
40+
$docsPath = $using:docsPath
41+
Import-Module platyPS
42+
Import-Module "$using:basePath\BuildOutput\VaporShell"
4043
Write-Host "Working on: $($_)"
4144
New-MarkdownHelp -Command "VaporShell\$_" -Force -NoMetadata -OutputFolder "$($docsPath)\docs\glossary"
42-
} | Wait-RSJob | Receive-RSJob
43-
44-
Get-RSJob | Remove-RSJob
45+
} -ThrottleLimit 10
4546

4647
$files = Get-ChildItem "$($docsPath)/docs/glossary" -Exclude "index.md"
4748

0 commit comments

Comments
 (0)