Skip to content

Commit 37498f9

Browse files
committedSep 30, 2022
unhardcode php version discovery, no master
1 parent 6cf2122 commit 37498f9

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
@echo off
22

3-
findstr /m "PHP_VERSION_ID 800" %~dp0..\..\..\main\php_version.h >nul 2>&1
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 >nul 2>&1
9-
if %errorlevel% equ 0 (
10-
set BRANCH=8.1
11-
goto :eof
12-
)
13-
set BRANCH=master
3+
for /f "usebackq tokens=3" %%i in (`findstr PHP_MAJOR_VERSION main\php_version.h`) do set BRANCH=%%i
4+
for /f "usebackq tokens=3" %%i in (`findstr PHP_MINOR_VERSION main\php_version.h`) do set BRANCH=%BRANCH%.%%i

0 commit comments

Comments
 (0)