psake / PowerShellBuild

Common build tasks for psake and Invoke-Build that build and test PowerShell modules
MIT License
135 stars 24 forks source link

Remove filter parameter and add filter to path #14

Closed pauby closed 5 years ago

pauby commented 5 years ago

Using the -filter *.ps1 parameter actually pulls in *.ps1* files in Windows PowerShell (note that this is NOT the case with PowerShell Core). A discussion around the idiosyncrasies of the parameter is here

Description

I removed the -Filter parameter and instead add the filter onto the path. This works in both Windows PowerShell and PowerShell Core.

Related Issue

https://github.com/psake/PowerShellBuild/issues/13

Motivation and Context

This fixes the issue where you have *.ps1xml files in your source folder / subfolder. It ensure that only *.ps1 script files are included in the module.

How Has This Been Tested?

I ran a normal build script which had a *.ps1xml file in the source folder and it was not included in the script module.

Types of changes

Checklist:

devblackops commented 5 years ago

Thanks @pauby!