@@ -71,15 +71,21 @@ function Check-All {
71
71
72
72
# -------------------------------------
73
73
74
- $files = Get-ChildItem $path \* - Include * .dll, * .ps1, * .psm1 - Recurse | Where-Object { $_.FullName -like " *Azure*" }
75
- $files = $files | Where-Object { ($_.FullName -notlike " *Newtonsoft.Json*" ) -and `
76
- ($_.FullName -notlike " *AutoMapper*" ) -and `
77
- ($_.FullName -notlike " *Security.Cryptography*" ) -and `
74
+ $thirdParty = Get-ChildItem $path \* - Include * .dll - Recurse | Where-Object {
75
+ ($_.Name -ilike " *Newtonsoft.Json*" ) -or `
76
+ ($_.Name -ilike " *AutoMapper*" ) -or `
77
+ ($_.Name -ilike " *YamlDotNet*" )
78
+ }
79
+ $exts = " *.ps1" , " *.psm1" , " *.ps1xml"
80
+ if ($Env: CheckPsd1 -ieq " True" ) {
81
+ $exts += " *.psd1"
82
+ }
83
+ $files += $thirdParty + (Get-ChildItem $path \* - Include $exts - Recurse)
84
+ $files = $files | Where-Object { ($_.FullName -notlike " *Security.Cryptography*" ) -and `
78
85
($_.FullName -notlike " *NLog*" ) -and `
79
- ($_.FullName -notlike " *YamlDotNet*" ) -and `
80
86
($_.FullName -notlike " *BouncyCastle.Crypto*" ) -and `
81
87
($_.FullName -notlike " *System.Management.Automation*" )}
82
- Write-Host " Checking the authenticode signature of $ ( $files.Count ) files (.dll, .ps1, .psm1 )" - ForegroundColor Yellow
88
+ Write-Host " Checking the authenticode signature of $ ( $files.Count ) files (* .dll, $ ( $exts -Join ' , ' ) )" - ForegroundColor Yellow
83
89
84
90
$invalidAuthenticodeList = @ ()
85
91
@@ -94,7 +100,7 @@ function Check-All {
94
100
Write-Host " Found $ ( $invalidAuthenticodeList.Count ) files with an invalid authenticode signature." - ForegroundColor Red
95
101
}
96
102
else {
97
- Write-Host " All files (.dll, .ps1, .psd1 ) have a valid authenticode signature." - ForegroundColor Green
103
+ Write-Host " All files (* .dll, $ ( $exts -Join ' , ' ) ) have a valid authenticode signature." - ForegroundColor Green
98
104
}
99
105
100
106
if ($invalidList.Length -gt 0 ) {
0 commit comments