mirror of
https://github.com/mlocati/docker-php-extension-installer
synced 2025-05-11 01:22:42 +00:00
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
This commit is contained in:
parent
a48eab9e71
commit
4ee43e5429
4 changed files with 308 additions and 125 deletions
23
scripts/test-installversion
Executable file
23
scripts/test-installversion
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Let's set a sane environment
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
WANTED_VERSION="${1:-}"
|
||||
INSTALLME=xdebug
|
||||
if test -n "$WANTED_VERSION"; then
|
||||
INSTALLME="$INSTALLME-$1"
|
||||
fi
|
||||
|
||||
./install-php-extensions "$INSTALLME"
|
||||
|
||||
INSTALLED_VERSION="$(php --ri xdebug | grep -Ei 'Version\s*=>\s*' | sed -E 's/^.*?=>\s*//')"
|
||||
if test -z "$WANTED_VERSION"; then
|
||||
echo 'Installing the default version worked'
|
||||
elif test "$WANTED_VERSION" = "$INSTALLED_VERSION"; then
|
||||
printf 'Installing specific version %s worked\n' "$WANTED_VERSION"
|
||||
else
|
||||
printf 'We wanted to install version %s, but we installed %s\n' "$WANTED_VERSION" "$INSTALLED_VERSION" >&2
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue