Skip to content

Commit 9e2433e

Browse files
authored
fix: display PHP version in static build (#1213)
1 parent 8a199bb commit 9e2433e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build-static.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,11 @@ fi
173173
174174
export CGO_LDFLAGS
175175
176-
LIBPHP_VERSION="$(./buildroot/bin/php-config --version)"
177-
export LIBPHP_VERSION
176+
#LIBPHP_VERSION="$(./buildroot/bin/php-config --version)"
177+
# Temporary workaround for https://github.com/crazywhalecc/static-php-cli/issues/563
178+
if [[ $(cat buildroot/include/php/main/php_version.h) =~ (define PHP_VERSION \"([0-9\.]+)) ]]; then
179+
export LIBPHP_VERSION=${BASH_REMATCH[2]}
180+
fi
178181
179182
cd ../
180183

0 commit comments

Comments
 (0)