From c78917c28a478065d0db827758c76da6af02f2ab Mon Sep 17 00:00:00 2001 From: J0WI Date: Wed, 21 Nov 2018 23:39:56 +0100 Subject: [PATCH] Update pecl extensions in update.sh --- php7.0/apache/Dockerfile | 2 +- php7.0/fpm-alpine/Dockerfile | 2 +- php7.0/fpm/Dockerfile | 2 +- php7.1/apache/Dockerfile | 2 +- php7.1/fpm-alpine/Dockerfile | 2 +- php7.1/fpm/Dockerfile | 2 +- php7.2/apache/Dockerfile | 2 +- php7.2/fpm-alpine/Dockerfile | 2 +- php7.2/fpm/Dockerfile | 2 +- update.sh | 35 +++++++++++++++++++++++++++++++---- 10 files changed, 40 insertions(+), 13 deletions(-) diff --git a/php7.0/apache/Dockerfile b/php7.0/apache/Dockerfile index 2dbfccc..5c354e8 100644 --- a/php7.0/apache/Dockerfile +++ b/php7.0/apache/Dockerfile @@ -39,7 +39,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.13; \ + pecl install APCu-5.1.14; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ \ diff --git a/php7.0/fpm-alpine/Dockerfile b/php7.0/fpm-alpine/Dockerfile index 34a29ae..7246ba7 100644 --- a/php7.0/fpm-alpine/Dockerfile +++ b/php7.0/fpm-alpine/Dockerfile @@ -39,7 +39,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.13; \ + pecl install APCu-5.1.14; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ \ diff --git a/php7.0/fpm/Dockerfile b/php7.0/fpm/Dockerfile index ea91cd9..fc79452 100644 --- a/php7.0/fpm/Dockerfile +++ b/php7.0/fpm/Dockerfile @@ -36,7 +36,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.13; \ + pecl install APCu-5.1.14; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ \ diff --git a/php7.1/apache/Dockerfile b/php7.1/apache/Dockerfile index eaa3632..bbd3025 100644 --- a/php7.1/apache/Dockerfile +++ b/php7.1/apache/Dockerfile @@ -39,7 +39,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.13; \ + pecl install APCu-5.1.14; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ \ diff --git a/php7.1/fpm-alpine/Dockerfile b/php7.1/fpm-alpine/Dockerfile index e40823f..68a9c88 100644 --- a/php7.1/fpm-alpine/Dockerfile +++ b/php7.1/fpm-alpine/Dockerfile @@ -39,7 +39,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.13; \ + pecl install APCu-5.1.14; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ \ diff --git a/php7.1/fpm/Dockerfile b/php7.1/fpm/Dockerfile index 00bd84b..eb81533 100644 --- a/php7.1/fpm/Dockerfile +++ b/php7.1/fpm/Dockerfile @@ -36,7 +36,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.13; \ + pecl install APCu-5.1.14; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ \ diff --git a/php7.2/apache/Dockerfile b/php7.2/apache/Dockerfile index da60dc4..ce4cd8f 100644 --- a/php7.2/apache/Dockerfile +++ b/php7.2/apache/Dockerfile @@ -37,7 +37,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.13; \ + pecl install APCu-5.1.14; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ \ diff --git a/php7.2/fpm-alpine/Dockerfile b/php7.2/fpm-alpine/Dockerfile index 2142a89..c406ec5 100644 --- a/php7.2/fpm-alpine/Dockerfile +++ b/php7.2/fpm-alpine/Dockerfile @@ -37,7 +37,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.13; \ + pecl install APCu-5.1.14; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ \ diff --git a/php7.2/fpm/Dockerfile b/php7.2/fpm/Dockerfile index 5ed8707..4d063e0 100644 --- a/php7.2/fpm/Dockerfile +++ b/php7.2/fpm/Dockerfile @@ -34,7 +34,7 @@ RUN set -ex; \ ; \ \ # pecl will claim success even if one install fails, so we need to perform each install separately - pecl install APCu-5.1.13; \ + pecl install APCu-5.1.14; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ \ diff --git a/update.sh b/update.sh index 5bfffaa..f611910 100755 --- a/update.sh +++ b/update.sh @@ -13,6 +13,33 @@ current="$(curl -fsSL 'https://downloads.joomla.org/api/v1/latest/cms' | jq -r ' urlVersion=$(echo $current | sed -e 's/\./-/g') sha1="$(curl -fsSL "https://downloads.joomla.org/api/v1/signatures/cms/$urlVersion" | jq -r --arg file "Joomla_${current}-Stable-Full_Package.tar.bz2" '.[] | .[] | select(.filename == $file).sha1')" +apcu_version="$( + git ls-remote --tags https://github.com/krakjoe/apcu.git \ + | cut -d/ -f3 \ + | grep -vE -- '-rc|-b' \ + | sed -E 's/^v//' \ + | sort -V \ + | tail -1 +)" + +memcached_version="$( + git ls-remote --tags https://github.com/php-memcached-dev/php-memcached.git \ + | cut -d/ -f3 \ + | grep -vE -- '-rc|-b' \ + | sed -E 's/^[rv]//' \ + | sort -V \ + | tail -1 +)" + +redis_version="$( + git ls-remote --tags https://github.com/phpredis/phpredis.git \ + | cut -d/ -f3 \ + | grep -viE '[a-z]' \ + | tr -d '^{}' \ + | sort -V \ + | tail -1 +)" + declare -A variantExtras=( [apache]='\n# Enable Apache Rewrite Module\nRUN a2enmod rewrite\n' [fpm]='' @@ -31,10 +58,10 @@ declare -A variantBases=( declare -A pecl_versions=( [php5-APCu]='4.0.11' [php5-memcached]='2.2.0' - [php5-redis]='4.2.0' - [php7-APCu]='5.1.13' - [php7-memcached]='3.0.4' - [php7-redis]='4.2.0' + [php5-redis]="$redis_version" + [php7-APCu]="$apcu_version" + [php7-memcached]="$memcached_version" + [php7-redis]="$redis_version" ) travisEnv=