From fe2b9fe5b8fe2b908a3f2efe82728c0de96f5eff Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Tue, 2 Apr 2019 18:58:01 -0700 Subject: [PATCH 1/4] Add SupportsWildcards --- .../Microsoft.Azure.Functions.PowerShellWorker.psm1 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Modules/Microsoft.Azure.Functions.PowerShellWorker/Microsoft.Azure.Functions.PowerShellWorker.psm1 b/src/Modules/Microsoft.Azure.Functions.PowerShellWorker/Microsoft.Azure.Functions.PowerShellWorker.psm1 index 9f56538f..87368f1f 100644 --- a/src/Modules/Microsoft.Azure.Functions.PowerShellWorker/Microsoft.Azure.Functions.PowerShellWorker.psm1 +++ b/src/Modules/Microsoft.Azure.Functions.PowerShellWorker/Microsoft.Azure.Functions.PowerShellWorker.psm1 @@ -49,6 +49,7 @@ function Get-OutputBinding { [CmdletBinding()] param( [Parameter(ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)] + [SupportsWildcards()] [string[]] $Name = '*', From 5951a4d91f019320eb1cbf1d8950e028ece28466 Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Tue, 2 Apr 2019 19:15:57 -0700 Subject: [PATCH 2/4] enforce build and update doc --- build.ps1 | 18 ++++++++++++++---- docs/cmdlets/Get-OutputBinding.md | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/build.ps1 b/build.ps1 index ef11a59e..fe89e889 100644 --- a/build.ps1 +++ b/build.ps1 @@ -22,6 +22,8 @@ param( $Configuration = "Debug" ) +#Requires -Version 6.0 + Import-Module "$PSScriptRoot/tools/helper.psm1" -Force # Bootstrap step @@ -108,9 +110,17 @@ if($Test.IsPresent) { } # Cmdlet help docs should be up-to-date - Update-MarkdownHelp -Path ./docs/cmdlets - $diff = git diff ./docs/cmdlets - if ($diff) { - throw "Cmdlet help docs are not up-to-date, run Update-MarkdownHelp.`n$diff`n" + + # PlatyPS needs the module to be imported. + Import-Module -Force (Join-Path $PSScriptRoot src Modules Microsoft.Azure.Functions.PowerShellWorker) + try { + $docsPath = Join-Path $PSScriptRoot docs cmdlets + Update-MarkdownHelp -Path $docsPath + $diff = git diff $docsPath + if ($diff) { + throw "Cmdlet help docs are not up-to-date, run Update-MarkdownHelp.`n$diff`n" + } + } finally { + Remove-Module Microsoft.Azure.Functions.PowerShellWorker -Force } } diff --git a/docs/cmdlets/Get-OutputBinding.md b/docs/cmdlets/Get-OutputBinding.md index 6433549c..d9ce7876 100644 --- a/docs/cmdlets/Get-OutputBinding.md +++ b/docs/cmdlets/Get-OutputBinding.md @@ -57,7 +57,7 @@ Required: False Position: 1 Default value: * Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False +Accept wildcard characters: True ``` ### -Purge From 6c241df6d6c6a8b916014e67502d47bf2cad7769 Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Tue, 2 Apr 2019 19:20:17 -0700 Subject: [PATCH 3/4] comments --- build.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.ps1 b/build.ps1 index fe89e889..3815fcdd 100644 --- a/build.ps1 +++ b/build.ps1 @@ -109,18 +109,20 @@ if($Test.IsPresent) { throw "Cannot find 'git'. Please make sure it's in the 'PATH'." } - # Cmdlet help docs should be up-to-date - + # Cmdlet help docs should be up-to-date. # PlatyPS needs the module to be imported. Import-Module -Force (Join-Path $PSScriptRoot src Modules Microsoft.Azure.Functions.PowerShellWorker) try { + # Update the help and diff the result. $docsPath = Join-Path $PSScriptRoot docs cmdlets Update-MarkdownHelp -Path $docsPath $diff = git diff $docsPath if ($diff) { throw "Cmdlet help docs are not up-to-date, run Update-MarkdownHelp.`n$diff`n" } + Write-Host "Help is up-to-date." } finally { + # Clean up. Remove-Module Microsoft.Azure.Functions.PowerShellWorker -Force } } From 03bbbd3ff346d1cf626f9e7e56c839edd6e541cc Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Tue, 2 Apr 2019 19:38:01 -0700 Subject: [PATCH 4/4] bug fix from platyPS --- docs/cmdlets/Get-OutputBinding.md | 2 +- docs/cmdlets/Push-OutputBinding.md | 2 +- docs/cmdlets/Trace-PipelineObject.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/cmdlets/Get-OutputBinding.md b/docs/cmdlets/Get-OutputBinding.md index d9ce7876..074a9eeb 100644 --- a/docs/cmdlets/Get-OutputBinding.md +++ b/docs/cmdlets/Get-OutputBinding.md @@ -76,7 +76,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/cmdlets/Push-OutputBinding.md b/docs/cmdlets/Push-OutputBinding.md index 297247c9..a8ef9976 100644 --- a/docs/cmdlets/Push-OutputBinding.md +++ b/docs/cmdlets/Push-OutputBinding.md @@ -138,7 +138,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/cmdlets/Trace-PipelineObject.md b/docs/cmdlets/Trace-PipelineObject.md index a07ee2c5..220f22b7 100644 --- a/docs/cmdlets/Trace-PipelineObject.md +++ b/docs/cmdlets/Trace-PipelineObject.md @@ -47,7 +47,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS