diff --git a/tools/ResolveTools/Resolve-ModulesDoc.ps1 b/tools/ResolveTools/Resolve-ModulesDoc.ps1 new file mode 100644 index 000000000000..46d623ecc95d --- /dev/null +++ b/tools/ResolveTools/Resolve-ModulesDoc.ps1 @@ -0,0 +1,74 @@ +$ProjectRoot = "$PSScriptRoot/../.." + +$Modules = Get-ChildItem -Recurse -Depth 2 -Path "$ProjectRoot/src" -File -Filter *.sln | ForEach-Object {$_.BaseName} + +$Content = @" +# Azure PowerShell Modules + +## Rollup Module + +| Description | Module Name | PowerShell Gallery Link | +| ------------------------------------- | ----------- | -------------------------------- | +| Azure PowerShell | ``Az`` | [![Az]][AzGallery] | +| Azure PowerShell with preview Modules | ``AzPreview`` | [![AzPreview]][AzPreviewGallery] | + +## Service Modules + +| Azure Service | Module Name | PowerShell Gallery Link | Changelog | +| ------------------------------ | ------------------------------- | ------------------------------------------------------------------ | -------------------------------------------------- | + +"@ + +# Table +foreach ($Module in $Modules) +{ + $ServiceName = $Module + $ModuleName = "``Az.$Module``" + $PSGalleryLink = "[![$Module]][${Module}Gallery]" + $ChangeLogLink = "[Changelog][${Module}ChangeLog]" + $Content += "| {0,-30} | {1,-31} | {2,-66} | {3,-48} |`n" -f $ServiceName, $ModuleName, $PSGalleryLink, $ChangeLogLink +} + +# Shields +$Content += @" + + + + +[Az]: https://img.shields.io/powershellgallery/v/Az.svg?style=flat-square&label=Az +[AzPreview]: https://img.shields.io/powershellgallery/v/AzPreview.svg?style=flat-square&label=AzPreview + +"@ +foreach ($Module in $Modules) +{ + $ShieldsLink = "[${Module}]:" + $Content += "{0,-29} https://img.shields.io/powershellgallery/v/Az.$Module.svg?style=flat-square&label=Az.$Module`n" -f $ShieldsLink +} + +# PowerShell Gallery +$Content += @" + + +[AzGallery]: https://www.powershellgallery.com/packages/Az/ +[AzPreviewGallery]: https://www.powershellgallery.com/packages/AzPreview/ + +"@ +foreach ($Module in $Modules) +{ + $PSGalleryLink = "[${Module}Gallery]:" + $Content += "{0,-36} https://www.powershellgallery.com/packages/Az.$Module/`n" -f $PSGalleryLink +} + +# ChangeLog +$Content += @" + + + +"@ +foreach ($Module in $Modules) +{ + $ChangeLogLink = "[${Module}ChangeLog]:" + $Content += "{0,-38} ../src/$Module/$Module/ChangeLog.md`n" -f $ChangeLogLink +} + +$Content | Out-File -FilePath "$ProjectRoot/documentation/azure-powershell-Modules.md" -Encoding utf8 \ No newline at end of file diff --git a/tools/Resolve-SolutionFile.ps1 b/tools/ResolveTools/Resolve-SolutionFile.ps1 similarity index 97% rename from tools/Resolve-SolutionFile.ps1 rename to tools/ResolveTools/Resolve-SolutionFile.ps1 index 2e231d660147..1f6f63fa77af 100644 --- a/tools/Resolve-SolutionFile.ps1 +++ b/tools/ResolveTools/Resolve-SolutionFile.ps1 @@ -14,7 +14,7 @@ # This will resolve all the solution files under the src folder # ```powershell -# ./tools/Resolve-SolutionFile.ps1 +# ./tools/ResolveTools/Resolve-SolutionFile.ps1 # ``` function Resolve($solutionFilePath) { @@ -84,5 +84,5 @@ function Resolve($solutionFilePath) { Set-Location $saveLocation } -$srcFolder = "$PSScriptRoot/../src" +$srcFolder = "$PSScriptRoot/../../src" Get-ChildItem -Recurse -Filter *.sln -Path $srcFolder -Exclude Accounts.sln -Depth 2 | Foreach-Object { Resolve $_.FullName } \ No newline at end of file