Skip to content

Commit 23e2a4b

Browse files
committed
Add PHP_INTERBASE_VER_PRE tag
1 parent 266a4a5 commit 23e2a4b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

build_scripts/php-fb-config.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ set PFB_FB64_DIR=C:\Program Files\Firebird\Firebird_5_0
1414
@REM Attach current git commit hash. git command must be in PATH
1515
set USE_GIT_HASH=0
1616

17+
@REM Grab version
1718
for /f "tokens=3" %%i in ('findstr /b /c:"#define PHP_INTERBASE_VER_MAJOR" %~dp0..\php_interbase.h') do set VER_MAJOR=%%i
1819
for /f "tokens=3" %%i in ('findstr /b /c:"#define PHP_INTERBASE_VER_MINOR" %~dp0..\php_interbase.h') do set VER_MINOR=%%i
1920
for /f "tokens=3" %%i in ('findstr /b /c:"#define PHP_INTERBASE_VER_REV" %~dp0..\php_interbase.h') do set VER_REV=%%i
20-
set PFB_VERS=%VER_MAJOR%.%VER_MINOR%.%VER_REV%-RC0
21+
for /f "tokens=3" %%i in ('findstr /b /c:"#define PHP_INTERBASE_VER_PRE" %~dp0..\php_interbase.h') do set VER_PRE=%%~i
22+
set PFB_VERS=%VER_MAJOR%.%VER_MINOR%.%VER_REV%%VER_PRE%
2123

2224
if %USE_GIT_HASH% equ 1 (
2325
for /f %%i in ('git -C %~dp0..\ rev-parse --short HEAD') do set PFB_VERS=%PFB_VERS%-%%i

php_interbase.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,15 @@ extern zend_module_entry ibase_module_entry;
4242
#define PHP_INTERBASE_VER_MAJOR 6
4343
#define PHP_INTERBASE_VER_MINOR 1
4444
#define PHP_INTERBASE_VER_REV 1
45+
#define PHP_INTERBASE_VER_PRE "-RC1"
4546

4647
// Keep two digit style similar to FB_API_VER
4748
#define PHP_INTERBASE_VER PHP_INTERBASE_VER_MAJOR * 10 + PHP_INTERBASE_VER_MINOR
48-
#define PHP_INTERBASE_VER_STR TO_STRING(PHP_INTERBASE_VER_MAJOR) "." TO_STRING(PHP_INTERBASE_VER_MINOR) "." TO_STRING(PHP_INTERBASE_VER_REV)
49+
#define PHP_INTERBASE_VER_STR \
50+
TO_STRING(PHP_INTERBASE_VER_MAJOR) "." \
51+
TO_STRING(PHP_INTERBASE_VER_MINOR) "." \
52+
TO_STRING(PHP_INTERBASE_VER_REV) \
53+
PHP_INTERBASE_VER_PRE
4954

5055
PHP_MINIT_FUNCTION(ibase);
5156
PHP_RINIT_FUNCTION(ibase);

0 commit comments

Comments
 (0)