Skip to content

Commit 26e5140

Browse files
committed
Fix smoke test artifact regex
1 parent 1474b2f commit 26e5140

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

php/BuildPhp/public/Invoke-PhpSmokeTests.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ function Invoke-PhpSmokeTests {
3939
}
4040

4141
$zipPattern = "php-*-$Arch.zip"
42-
$zipRegex = if($Ts -eq 'nts') {
43-
"^php-[^-]+-nts-Win32-vs\d+-${Arch}\.zip$"
44-
} else {
45-
"^php-[^-]+-Win32-vs\d+-${Arch}\.zip$"
46-
}
42+
$zipRegex = "^php-(.+?)(-nts)?-Win32-v[sc]\d+-${Arch}\.zip$"
4743
$zipMatches = @(
4844
Get-ChildItem -Path $artifactsPath -Filter $zipPattern -File |
4945
Where-Object {
50-
$_.Name -match $zipRegex
46+
$zipMatch = [regex]::Match($_.Name, $zipRegex, [System.Text.RegularExpressions.RegexOptions]::IgnoreCase)
47+
$_.Name -notmatch '^php-(devel-pack|debug-pack|test-pack)-' -and
48+
$_.Name -notmatch '-src\.zip$' -and
49+
$zipMatch.Success -and
50+
(($Ts -eq 'nts') -eq $zipMatch.Groups[2].Success)
5151
} |
5252
Sort-Object Name
5353
)

0 commit comments

Comments
 (0)