Skip to content

Commit 2e1cb18

Browse files
committed
fix BRANCH discovery for phpsdk_deps/DEPS_DIR
1 parent e24c34d commit 2e1cb18

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

.github/scripts/windows/build_task.bat

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,9 @@ if %errorlevel% neq 0 exit /b 3
3333
del /f /q C:\Windows\System32\libssl-1_1-x64.dll >NUL 2>NUL
3434
if %errorlevel% neq 0 exit /b 3
3535

36-
if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
37-
set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3%
38-
) else (
39-
set BRANCH=master
40-
)
36+
call %~dp0find-target-branch.bat
4137
set STABILITY=staging
38+
4239
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VS%-%PHP_SDK_ARCH%
4340
rem SDK is cached, deps info is cached as well
4441
echo Updating dependencies in %DEPS_DIR%
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@echo off
2+
3+
findstr /m "PHP_VERSION_ID 800" %~dp0..\..\..\main\php_version.h
4+
if %errorlevel% equ 0 (
5+
set BRANCH=8.0
6+
goto :eof
7+
)
8+
findstr /m "PHP_VERSION_ID 810" %~dp0..\..\..\main\php_version.h
9+
if %errorlevel% equ 0 (
10+
set BRANCH=8.1
11+
goto :eof
12+
)
13+
set BRANCH=master

.github/scripts/windows/test_task.bat

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ set NO_INTERACTION=1
99
set REPORT_EXIT_STATUS=1
1010
set SKIP_IO_CAPTURE_TESTS=1
1111

12-
if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
13-
set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3%
14-
set STABILITY=stable
15-
) else (
16-
set BRANCH=master
12+
call %~dp0find-target-branch.bat
13+
if "%BRANCH%" equ "master" (
1714
set STABILITY=staging
15+
) else (
16+
set STABILITY=stable
1817
)
18+
1919
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VS%-%PHP_SDK_ARCH%
2020
if not exist "%DEPS_DIR%" (
2121
echo "%DEPS_DIR%" doesn't exist

.github/workflows/nightly.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,6 @@ jobs:
596596
name: "${{ matrix.branch.name }}_WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
597597
runs-on: windows-2019
598598
env:
599-
APPVEYOR_REPO_BRANCH: "${{ github.ref_name }}"
600599
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
601600
PHP_BUILD_OBJ_DIR: c:\obj
602601
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk

.github/workflows/push.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ jobs:
144144
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
145145
runs-on: windows-2019
146146
env:
147-
APPVEYOR_REPO_BRANCH: "${{ github.ref_name }}"
148147
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
149148
PHP_BUILD_OBJ_DIR: c:\obj
150149
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk

0 commit comments

Comments
 (0)