File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 44FIREBIRD_INCLUDE_DIR=" /opt/firebird/include"
55INSTALL_DIR=" ../ext"
66REPO_URL=" https://github.com/FirebirdSQL/php-firebird.git"
7- DRIVER_VERSION=" 5.0.2"
87BRANCH_OR_COMMIT=" master" # Set to a specific tag or commit if needed
98PHP_VERSIONS=(" 7.4" " 8.0" " 8.1" " 8.2" " 8.3" " 8.4" ) # Adjust as needed
109BUILD_DIR=" php-firebird-build"
@@ -16,6 +15,15 @@ rm -rf "$BUILD_DIR"
1615echo " Cloning repository from $REPO_URL (branch: $BRANCH_OR_COMMIT )..."
1716git clone --depth 1 --branch " $BRANCH_OR_COMMIT " " $REPO_URL " " $BUILD_DIR "
1817
18+ # Read version from driver
19+ if [[ -f " $BUILD_DIR /php_interbase.h" ]]; then
20+ DRIVER_VERSION=$( grep -Eo ' PHP_INTERBASE_VERSION\s+"[0-9.]+"' " $BUILD_DIR /php_interbase.h" | grep -Eo ' [0-9.]+' )
21+ elif [[ -f " $BUILD_DIR /package.xml" ]]; then
22+ DRIVER_VERSION=$( grep -oPm1 " (?<=<version>)[^<]+" " $BUILD_DIR /package.xml" )
23+ else
24+ DRIVER_VERSION=" unknown"
25+ fi
26+
1927for VERSION in " ${PHP_VERSIONS[@]} " ; do
2028 echo " ==> Building for PHP $VERSION "
2129
You can’t perform that action at this time.
0 commit comments