-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔖 Merge branch 'release/v1.3.0' into main
Release v1.3.0
- Loading branch information
Showing
214 changed files
with
22,169 additions
and
504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<# | ||
.SYNOPSIS | ||
Create Command List files | ||
#> | ||
using namespace System.Management.Automation | ||
using namespace System.Collections.Generic | ||
|
||
[CmdletBinding()] | ||
param( | ||
[Parameter()] | ||
[string] $Locale = "en-US" | ||
) | ||
|
||
$ErrorActionPreference = 'Stop' | ||
|
||
$modulePath = Join-Path -Path $PSScriptRoot -ChildPath .. -AdditionalChildPath out, AWX.psm | ||
$module = Import-Module $modulePath -PassThru -Verbose:$false | ||
|
||
function Out-CommandList | ||
{ | ||
[CmdletBinding()] | ||
[OutputType([System.IO.FileInfo])] | ||
param( | ||
[Parameter(Mandatory)] | ||
[string] $GroupName | ||
, | ||
[Parameter(Mandatory, ValueFromPipeline)] | ||
[CmdletInfo[]] $Command | ||
) | ||
begin | ||
{ | ||
$path = Join-Path -Path $PSScriptRoot -ChildPath $Locale -AdditionalChildPath ("CommandListBy{0}.md" -f $GroupName) | ||
$Commands = [List[CmdletInfo]]::new() | ||
} | ||
process | ||
{ | ||
$Commands.AddRange($Command) | ||
} | ||
end | ||
{ | ||
$Commands | | ||
Group-Object -Property $GroupName | | ||
ForEach-Object -Begin { | ||
"# Command List By $GroupName", "" | Write-Output | ||
} -Process { | ||
("## {0}" -f $_.Name), | ||
"", | ||
( | ||
$_.Group | ForEach-Object { "- [{0}](./cmdlets/{0}.md)" -f $_.Name } | ||
), | ||
"" | Write-Output | ||
} | | ||
Out-File -FilePath $path -Encoding utf8NoBOM | ||
|
||
Write-Verbose ("Created command list: GroupBy = {0} to '{1}'" -f $GroupName, $path) | ||
return Get-Item $path | ||
} | ||
} | ||
|
||
$module.ExportedCommands.Values | Out-CommandList -GroupName Noun | ||
$module.ExportedCommands.Values | Out-CommandList -GroupName Verb | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.