1+ $ProjectRoot = " $PSScriptRoot /../.."
2+
3+ $Modules = Get-ChildItem - Recurse - Depth 2 - Path " $ProjectRoot /src" - File - Filter * .sln | ForEach-Object {$_.BaseName }
4+
5+ $Content = @"
6+ # Azure PowerShell Modules
7+
8+ ## Rollup Module
9+
10+ | Description | Module Name | PowerShell Gallery Link |
11+ | ------------------------------------- | ----------- | -------------------------------- |
12+ | Azure PowerShell | `` Az`` | [![Az]][AzGallery] |
13+ | Azure PowerShell with preview Modules | `` AzPreview`` | [![AzPreview]][AzPreviewGallery] |
14+
15+ ## Service Modules
16+
17+ | Azure Service | Module Name | PowerShell Gallery Link | Changelog |
18+ | ------------------------------ | ------------------------------- | ------------------------------------------------------------------ | -------------------------------------------------- |
19+
20+ "@
21+
22+ # Table
23+ foreach ($Module in $Modules )
24+ {
25+ $ServiceName = $Module
26+ $ModuleName = " `` Az.$Module `` "
27+ $PSGalleryLink = " [![$Module ]][${Module} Gallery]"
28+ $ChangeLogLink = " [Changelog][${Module} ChangeLog]"
29+ $Content += " | {0,-30} | {1,-31} | {2,-66} | {3,-48} |`n " -f $ServiceName , $ModuleName , $PSGalleryLink , $ChangeLogLink
30+ }
31+
32+ # Shields
33+ $Content += @"
34+
35+ <!-- References -->
36+
37+ <!-- Shields -->
38+ [Az]: https://img.shields.io/powershellgallery/v/Az.svg?style=flat-square&label=Az
39+ [AzPreview]: https://img.shields.io/powershellgallery/v/AzPreview.svg?style=flat-square&label=AzPreview
40+
41+ "@
42+ foreach ($Module in $Modules )
43+ {
44+ $ShieldsLink = " [${Module} ]:"
45+ $Content += " {0,-29} https://img.shields.io/powershellgallery/v/Az.$Module .svg?style=flat-square&label=Az.$Module `n " -f $ShieldsLink
46+ }
47+
48+ # PowerShell Gallery
49+ $Content += @"
50+
51+ <!-- PS Gallery -->
52+ [AzGallery]: https://www.powershellgallery.com/packages/Az/
53+ [AzPreviewGallery]: https://www.powershellgallery.com/packages/AzPreview/
54+
55+ "@
56+ foreach ($Module in $Modules )
57+ {
58+ $PSGalleryLink = " [${Module} Gallery]:"
59+ $Content += " {0,-36} https://www.powershellgallery.com/packages/Az.$Module /`n " -f $PSGalleryLink
60+ }
61+
62+ # ChangeLog
63+ $Content += @"
64+
65+ <!-- ChangeLog -->
66+
67+ "@
68+ foreach ($Module in $Modules )
69+ {
70+ $ChangeLogLink = " [${Module} ChangeLog]:"
71+ $Content += " {0,-38} ../src/$Module /$Module /ChangeLog.md`n " -f $ChangeLogLink
72+ }
73+
74+ $Content | Out-File - FilePath " $ProjectRoot /documentation/azure-powershell-Modules.md" - Encoding utf8
0 commit comments