mirror of
https://github.com/php-win-ext/php-windows-builder.git
synced 2026-03-24 00:52:06 +01:00
Fix building for remote PR
This commit is contained in:
@@ -51,9 +51,13 @@ Function Get-ExtensionConfig {
|
||||
Copy-Item $PSScriptRoot\..\config\stubs\$Extension.composer.json composer.json
|
||||
}
|
||||
}
|
||||
$ref = $ExtensionRef
|
||||
if ($ref -match 'refs/pull/(\d+)/merge') {
|
||||
$ref = $Matches[1]
|
||||
}
|
||||
$config = [PSCustomObject]@{
|
||||
name = $Extension
|
||||
ref = $ExtensionRef
|
||||
ref = $ref
|
||||
php_version = $PhpVersion
|
||||
arch = $Arch
|
||||
ts = $Ts
|
||||
|
||||
@@ -23,7 +23,7 @@ function Get-ExtensionSource {
|
||||
}
|
||||
if($null -eq $ExtensionRef -or $ExtensionRef -eq '') {
|
||||
if($env:GITHUB_EVENT_NAME -contains "pull_request") {
|
||||
$ExtensionRef = $env:GITHUB_HEAD_REF
|
||||
$ExtensionRef = $env:GITHUB_REF
|
||||
} elseif($null -ne $env:GITHUB_REF_NAME) {
|
||||
$ExtensionRef = $env:GITHUB_REF_NAME
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user