Skip to content

Commit 6aa5481

Browse files
authored
Clean up the logic of hybrid module (#23535)
1 parent ade2970 commit 6aa5481

File tree

3 files changed

+10
-34
lines changed

3 files changed

+10
-34
lines changed

tools/ExecuteCIStep.ps1

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,7 @@ If ($TestAutorest)
311311
Write-Warning "There is no test-module.ps1 found in the folder: $AutorestDirectory"
312312
Return
313313
}
314-
$ModuleName = Split-Path -Path $AutorestDirectory -Leaf
315-
If ($ModuleName.EndsWith(".Autorest"))
316-
{
317-
$ModuleName = Split-Path -Path $AutorestDirectory | Split-Path -Leaf
318-
}
314+
$ModuleName = Split-Path -Path $AutorestDirectory | Split-Path -Leaf
319315
$ModuleFolderName = $ModuleName.Split(".")[1]
320316
If (Test-Path $CIPlanPath)
321317
{

tools/Gen2Master/MoveFromGeneration2Master.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,15 @@ Function Move-Generation2Master {
177177
}
178178
Import-Module $psd1Path
179179
Import-Module platyPS
180-
Update-MarkdownHelpModule -Path "$DestPath\$ModuleName$Psd1FolderPostfix\help" -RefreshModulePage -AlphabeticParamsOrder -UseFullTypeName -ExcludeDontShow
180+
$HelpFolder = "$DestPath\$ModuleName$Psd1FolderPostfix\help"
181+
if ((Get-ChildItem $HelpFolder).Length -ne 0)
182+
{
183+
Update-MarkdownHelpModule -Path $HelpFolder -RefreshModulePage -AlphabeticParamsOrder -UseFullTypeName -ExcludeDontShow
184+
}
185+
else
186+
{
187+
New-MarkdownHelp -UseFullTypeName -AlphabeticParamsOrder -Module "Az.$ModuleName" -OutputFolder $HelpFolder
188+
}
181189
} -ArgumentList $ModuleName, $DestPath, $Psd1FolderPostfix
182190

183191
$job | Wait-Job | Receive-Job

tools/cmdletcount.ps1

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)