Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync tools code from main branch to generation branch #24892

Merged
merged 1 commit into from
May 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tools/Gen2Master/MoveFromGeneration2Master.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Function Move-Generation2Master {
$sourceHelpFolder = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $submoduleDir.Name) -ChildPath "docs"
$destHelpHolder = Join-Path -Path (Join-Path -Path $DestPath -ChildPath $ModuleName) -ChildPath "help"
Write-Host "Copying help files from $sourceHelpFolder to $destHelpHolder" -ForegroundColor Yellow
Get-ChildItem -Path $sourceHelpFolder -Filter *.md | Copy-Item -Destination $destHelpHolder
Get-ChildItem -Path $sourceHelpFolder -Filter *-*.md | Copy-Item -Destination $destHelpHolder
#Region Clean Local Modules
$LocalModulesPath = Join-Path -Path (Join-Path -Path (Join-Path -Path $DestPath -ChildPath $submoduleDir.Name) -ChildPath 'generated') -ChildPath 'modules'
If (Test-Path $LocalModulesPath) {
Expand Down Expand Up @@ -218,6 +218,14 @@ Function Move-Generation2Master {
Copy-Item -Path "$DestPath\$ModuleName.Autorest\help\Az.$ModuleName.md" -Destination $HelpFolder -Recurse
New-MarkdownHelp -UseFullTypeName -AlphabeticParamsOrder -Module "Az.$ModuleName" -OutputFolder $HelpFolder
}
$moduleMarkdownPath = "$DestPath\$ModuleName$Psd1FolderPostfix\help\Az.$ModuleName.md"
$moduleMarkdownContent = Get-Content -Path $moduleMarkdownPath
$moduleMarkdownContent = $moduleMarkdownContent -replace '{{ Update Module Guid }}', (New-Guid).Guid
$moduleMarkdownContent = $moduleMarkdownContent -replace '{{ Update Download Link }}', "https://learn.microsoft.com/powershell/module/az.$($ModuleName.ToLower())"
$moduleMarkdownContent = $moduleMarkdownContent -replace '{{ Update Help Version }}', '1.0.0.0'
$moduleMarkdownContent = $moduleMarkdownContent -replace '{{ Update Locale }}', 'en-US'
$moduleMarkdownContent = $moduleMarkdownContent -replace '{{ Fill in the Description }}', "Microsoft Azure PowerShell: $ModuleName cmdlets"
$moduleMarkdownContent | Set-Content -Path $moduleMarkdownPath
} -ArgumentList $PSScriptRoot, $ModuleName, $DestPath, $Psd1FolderPostfix

$job | Wait-Job | Receive-Job
Expand Down