Skip to content

Commit 693fa20

Browse files
azure-powershell-botazurepowershell
andauthored
Sync tools folder from main branch to generation branch (#24892)
Co-authored-by: azurepowershell <[email protected]>
1 parent 65b5571 commit 693fa20

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tools/Gen2Master/MoveFromGeneration2Master.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Function Move-Generation2Master {
9393
$sourceHelpFolder = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $submoduleDir.Name) -ChildPath "docs"
9494
$destHelpHolder = Join-Path -Path (Join-Path -Path $DestPath -ChildPath $ModuleName) -ChildPath "help"
9595
Write-Host "Copying help files from $sourceHelpFolder to $destHelpHolder" -ForegroundColor Yellow
96-
Get-ChildItem -Path $sourceHelpFolder -Filter *.md | Copy-Item -Destination $destHelpHolder
96+
Get-ChildItem -Path $sourceHelpFolder -Filter *-*.md | Copy-Item -Destination $destHelpHolder
9797
#Region Clean Local Modules
9898
$LocalModulesPath = Join-Path -Path (Join-Path -Path (Join-Path -Path $DestPath -ChildPath $submoduleDir.Name) -ChildPath 'generated') -ChildPath 'modules'
9999
If (Test-Path $LocalModulesPath) {
@@ -218,6 +218,14 @@ Function Move-Generation2Master {
218218
Copy-Item -Path "$DestPath\$ModuleName.Autorest\help\Az.$ModuleName.md" -Destination $HelpFolder -Recurse
219219
New-MarkdownHelp -UseFullTypeName -AlphabeticParamsOrder -Module "Az.$ModuleName" -OutputFolder $HelpFolder
220220
}
221+
$moduleMarkdownPath = "$DestPath\$ModuleName$Psd1FolderPostfix\help\Az.$ModuleName.md"
222+
$moduleMarkdownContent = Get-Content -Path $moduleMarkdownPath
223+
$moduleMarkdownContent = $moduleMarkdownContent -replace '{{ Update Module Guid }}', (New-Guid).Guid
224+
$moduleMarkdownContent = $moduleMarkdownContent -replace '{{ Update Download Link }}', "https://learn.microsoft.com/powershell/module/az.$($ModuleName.ToLower())"
225+
$moduleMarkdownContent = $moduleMarkdownContent -replace '{{ Update Help Version }}', '1.0.0.0'
226+
$moduleMarkdownContent = $moduleMarkdownContent -replace '{{ Update Locale }}', 'en-US'
227+
$moduleMarkdownContent = $moduleMarkdownContent -replace '{{ Fill in the Description }}', "Microsoft Azure PowerShell: $ModuleName cmdlets"
228+
$moduleMarkdownContent | Set-Content -Path $moduleMarkdownPath
221229
} -ArgumentList $PSScriptRoot, $ModuleName, $DestPath, $Psd1FolderPostfix
222230

223231
$job | Wait-Job | Receive-Job

0 commit comments

Comments
 (0)