File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
extension/BuildPhpExtension/private Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,13 @@ Function Get-ExtensionConfig {
61
61
if ($ref -match ' refs/pull/(\d+)/merge' ) {
62
62
$ref = $Matches [1 ]
63
63
}
64
+ $packageName = $Extension
65
+ if ($Extension.Contains (" oci8" )) {
66
+ $packageName = " oci8"
67
+ }
64
68
$config = [PSCustomObject ]@ {
65
69
name = $Extension
66
- package_name = $Extension
70
+ package_name = $packageName
67
71
ref = $ref
68
72
php_version = $PhpVersion
69
73
arch = $Arch
@@ -78,18 +82,14 @@ Function Get-ExtensionConfig {
78
82
docs = @ ()
79
83
build_directory = " "
80
84
}
81
- if ($Extension.Contains (" oci8" )) {
82
- $config.package_name = " oci8"
83
- }
84
85
$composerJson = $null
86
+ if ((-not (Test-Path composer.json)) -and (Test-Path $PSScriptRoot \..\config\stubs\$packageName.composer.json )) {
87
+ Copy-Item $PSScriptRoot \..\config\stubs\$packageName.composer.json composer.json
88
+ }
85
89
if (Test-Path composer.json) {
86
90
$composerJson = Get-Content composer.json - Raw | ConvertFrom-Json
87
91
}
88
- if ($null -eq $composerJson -or $null -eq $composerJson ." php-ext" ) {
89
- if (Test-Path $PSScriptRoot \..\config\stubs\${config.package_name}.composer.json ) {
90
- Copy-Item $PSScriptRoot \..\config\stubs\${config.package_name}.composer.json composer.json
91
- }
92
- } else {
92
+ if ($null -ne $composerJson -and $null -ne $composerJson ." php-ext" ) {
93
93
$composerJson ." php-ext" ." configure-options" | ForEach-Object {
94
94
$config.options += " --$ ( $_.name ) "
95
95
}
You can’t perform that action at this time.
0 commit comments