Skip to content

Commit 33c0582

Browse files
committed
Only apply patches for manual pecl builds
1 parent 2a82938 commit 33c0582

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

extension/BuildPhpExtension/private/Get-Extension.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,14 @@ function Get-Extension {
5656
throw "No extension found in config.w32"
5757
}
5858
$name = ($extensionLine -replace '.*EXTENSION\(([^,]+),.*', '$1') -replace '["'']', ''
59-
if(Test-Path -PATH $PSScriptRoot\..\patches\$name.ps1) {
60-
. $PSScriptRoot\..\patches\$name.ps1
59+
60+
# Apply patches only for php/php-windows-builder and shivammathur/php-windows-builder
61+
if($null -ne $env:GITHUB_REPOSITORY) {
62+
if($env:GITHUB_REPOSITORY -eq 'php/php-windows-builder' -or $env:GITHUB_REPOSITORY -eq 'shivammathur/php-windows-builder') {
63+
if(Test-Path -PATH $PSScriptRoot\..\patches\$name.ps1) {
64+
. $PSScriptRoot\..\patches\$name.ps1
65+
}
66+
}
6167
}
6268
return $name
6369
}

0 commit comments

Comments
 (0)