Skip to content

Commit f354450

Browse files
committed
Change ARTIFACT_NAMING_SCHEME to env
1 parent a35c275 commit f354450

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

.github/workflows/pecl.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ jobs:
6767
- name: Build the extension
6868
uses: ./extension
6969
with:
70-
artifact-naming-scheme: 'pecl'
7170
extension-url: ${{ inputs.extension-url }}
7271
extension-ref: ${{ inputs.extension-ref }}
7372
php-version: ${{ matrix.php-version }}
@@ -78,6 +77,8 @@ jobs:
7877
build-directory: ${{ inputs.build-directory }}
7978
run-tests: ${{ inputs.run-tests }}
8079
test-runner: ${{ inputs.test-runner }}
80+
env:
81+
artifact-naming-scheme: pecl
8182

8283
artifacts:
8384
runs-on: ubuntu-latest

extension/BuildPhpExtension/private/Add-Package.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ function Add-Package {
8181
if(-not(Test-Path -Path "php_$($Config.name).dll")) {
8282
throw "Failed to build extension"
8383
}
84-
if($env:ARTIFACT_NAMING_SCHEME -eq 'pie') {
84+
if($env:ARTIFACT_NAMING_SCHEME -eq 'pecl') {
85+
$artifact = "php_$($Config.package_name)-$($Config.ref.ToLower())-$($Config.php_version)-$($Config.ts)-$($Config.vs_version)-$arch"
86+
} else {
8587
if($arch -eq 'x64') {
8688
$arch = 'x86_64'
8789
}
@@ -92,8 +94,6 @@ function Add-Package {
9294
Move-Item -Path $_ -Destination "$artifact.$extension" -Force
9395
}
9496
}
95-
} else {
96-
$artifact = "php_$($Config.package_name)-$($Config.ref.ToLower())-$($Config.php_version)-$($Config.ts)-$($Config.vs_version)-$arch"
9797
}
9898

9999
7z a -sdel "$artifact.zip" *

extension/BuildPhpExtension/private/Invoke-Build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Function Invoke-Build {
2727
$builder = "php-sdk\phpsdk-$($Config.vs_version)-$($Config.Arch).bat"
2828
$task = (Get-Item -Path "." -Verbose).FullName + '\task.bat'
2929
$ref = $Config.ref
30-
if($env:ARTIFACT_NAMING_SCHEME -ne 'pie') {
30+
if($env:ARTIFACT_NAMING_SCHEME -eq 'pecl') {
3131
$ref = $Config.ref.ToLower()
3232
}
3333
$suffix = "php_" + (@(

extension/action.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ inputs:
4343
description: Directory to build the extension in
4444
required: false
4545
default: 'build'
46-
artifact-naming-scheme:
47-
description: Naming schema for the artifacts, pie or pecl
48-
deprecationMessage: "This will be removed once pie is released"
49-
required: false
50-
default: pie
5146

5247
runs:
5348
using: composite
@@ -60,7 +55,7 @@ runs:
6055
env:
6156
CONFIGURE_ARGS: ${{inputs.args}}
6257
LIBRARIES: ${{inputs.libs}}
63-
ARTIFACT_NAMING_SCHEME: ${{inputs.artifact-naming-scheme}}
58+
ARTIFACT_NAMING_SCHEME: ${{env.artifact-naming-scheme}}
6459
RUN_TESTS: ${{inputs.run-tests}}
6560
TEST_RUNNER: ${{inputs.test-runner}}
6661
BUILD_DIRECTORY: ${{inputs.build-directory}}

0 commit comments

Comments
 (0)