From 9e2433e39b607ea603d8afdb300e4a77d929cf1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 27 Nov 2024 13:22:39 +0100 Subject: [PATCH] fix: display PHP version in static build (#1213) --- build-static.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build-static.sh b/build-static.sh index 543da582a..c72594094 100755 --- a/build-static.sh +++ b/build-static.sh @@ -173,8 +173,11 @@ fi export CGO_LDFLAGS -LIBPHP_VERSION="$(./buildroot/bin/php-config --version)" -export LIBPHP_VERSION +#LIBPHP_VERSION="$(./buildroot/bin/php-config --version)" +# Temporary workaround for https://github.com/crazywhalecc/static-php-cli/issues/563 +if [[ $(cat buildroot/include/php/main/php_version.h) =~ (define PHP_VERSION \"([0-9\.]+)) ]]; then + export LIBPHP_VERSION=${BASH_REMATCH[2]} +fi cd ../