Skip to content

Commit 3cb0ef0

Browse files
authored
Merge branch 'master' into remove-mssharedlibkey
2 parents 6b09352 + ecb0289 commit 3cb0ef0

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

tools/GenerateHelp.ps1

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Param(
1111
[string]$FilteredModules
1212
)
1313

14+
$ResourceManagerFolders = Get-ChildItem -Path ".\src\ResourceManager"
1415
Import-Module "$PSScriptRoot\HelpGeneration\HelpGeneration.psm1"
1516
$UnfilteredHelpFolders = Get-ChildItem "help" -Recurse -Directory | where { $_.FullName -like "*$BuildConfig*" -and $_.FullName -notlike "*Stack*" }
1617
$FilteredHelpFolders = $UnfilteredHelpFolders
@@ -36,6 +37,22 @@ if ($ValidateMarkdownHelp)
3637
New-Item -Path "$PSScriptRoot\..\src\Package" -Name "Exceptions" -ItemType Directory
3738
}
3839

40+
$Exceptions = @()
41+
foreach ($ServiceFolder in $ResourceManagerFolders)
42+
{
43+
$HelpFolder = Get-ChildItem -Path $ServiceFolder -Filter "help" -Recurse -Directory
44+
if ($HelpFolder -eq $null)
45+
{
46+
$Exceptions += $ServiceFolder.Name
47+
}
48+
}
49+
50+
if ($Exceptions.Count -gt 0)
51+
{
52+
$Services = $Exceptions -Join ", "
53+
throw "No help folder found in the following services: $Services"
54+
}
55+
3956
$SuppressedExceptionsPath = "$PSScriptRoot\..\src\Package\Exceptions"
4057
$NewExceptionsPath = "$PSScriptRoot\..\src\Package"
4158
Copy-Item -Path "$PSScriptRoot\HelpGeneration\Exceptions\ValidateHelpIssues.csv" -Destination $SuppressedExceptionsPath
@@ -50,7 +67,7 @@ if ($ValidateMarkdownHelp)
5067
}
5168
else
5269
{
53-
Remove-Item -Path "$NewExceptionsPath\ValidateHelpIssues.csv" -Force
70+
Remove-Item -Path "$NewExceptionsPath\ValidateHelpIssues.csv" -Force
5471
}
5572
}
5673

0 commit comments

Comments
 (0)