Skip to content

Commit d01fa1f

Browse files
azure-powershell-botazurepowershell
and
azurepowershell
authored
Sync tools folder from main branch to generation branch (#24377)
Co-authored-by: azurepowershell <[email protected]>
1 parent 80267c5 commit d01fa1f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/Gen2Master/MoveFromGeneration2Master.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ Function Move-Generation2Master {
8888
Copy-Item -Recurse -Path $SourceItem -Destination $DestItem
8989
}
9090
}
91+
$sourceHelpFolder = Join-Path -Path (Join-Path -Path $SourcePath -ChildPath $submoduleDir.Name) -ChildPath "docs"
92+
$destHelpHolder = Join-Path -Path (Join-Path -Path $DestPath -ChildPath $ModuleName) -ChildPath "help"
93+
Write-Host "Copying help files from $sourceHelpFolder to $destHelpHolder" -ForegroundColor Yellow
94+
Get-ChildItem -Path $sourceHelpFolder -Filter *-*.md | Copy-Item -Destination $destHelpHolder
9195
#Region Clean Local Modules
9296
$LocalModulesPath = Join-Path -Path (Join-Path -Path (Join-Path -Path $DestPath -ChildPath $submoduleDir.Name) -ChildPath 'generated') -ChildPath 'modules'
9397
If (Test-Path $LocalModulesPath) {
@@ -130,6 +134,7 @@ Function Move-Generation2Master {
130134
}
131135
$Psd1Metadata.Remove("PrivateData")
132136
}
137+
133138
# Generate csproj file and add the dependency in the solution file
134139
Copy-Template -SourceName Az.ModuleName.csproj -DestPath (Join-Path $DestPath $submoduleDir.Name) -DestName "Az.$submoduleName.csproj" -RootModuleName $ModuleName -ModuleName $submoduleName -ModuleFolder $submoduleDir.Name
135140
}
@@ -176,6 +181,7 @@ Function Move-Generation2Master {
176181
$psd1Data.RequiredAssemblies = $psd1Data.RequiredAssemblies | Where-Object { $_ -ne $assemblyToRemove }
177182
Update-ModuleManifest -Path $psd1Path -RequiredAssemblies $psd1Data.RequiredAssemblies
178183
}
184+
179185
Import-Module $psd1Path
180186
Import-Module platyPS
181187
$HelpFolder = "$DestPath\$ModuleName$Psd1FolderPostfix\help"
@@ -195,7 +201,6 @@ Function Move-Generation2Master {
195201
Remove-Item $ExposedHelpFile.FullName
196202
}
197203
}
198-
Write-Host "$ScriptRoot/../ResolveTools/Resolve-Psd1.ps1"
199204
& "$ScriptRoot/../ResolveTools/Resolve-Psd1.ps1" -ModuleName $ModuleName -ArtifactFolder "$DestPath\..\..\artifacts" -Psd1Folder "$DestPath/$ModuleName$Psd1FolderPostfix"
200205
}
201206
else

0 commit comments

Comments
 (0)