diff --git a/conf/buildpack.conf b/conf/buildpack.conf index 1a1d0e87..ec09c1f8 100644 --- a/conf/buildpack.conf +++ b/conf/buildpack.conf @@ -45,5 +45,6 @@ libonig_version="${libonig_version:-6.9.8}" zlib_version="${zlib_version:-1.3}" igbinary_version="3.2.15" mongodb_version="1.18.1" -amqp_version="1.11.0" +librabbitmq_version="0.14.0" +amqp_version="2.1.2" phpredis_version="6.0.2" diff --git a/support/ext/amqp b/support/ext/amqp index 1ed62918..074fea44 100755 --- a/support/ext/amqp +++ b/support/ext/amqp @@ -177,31 +177,54 @@ librabbitmq_prefix="/app/vendor/php/lib/rabbitmq" # librabbitmq # https://github.com/alanxz/rabbitmq-c/releases - +# Default `$version` is loaded from the buildpack.conf file. pkgname="librabbitmq-c" -version="0.13.0" source_url="https://github.com/alanxz/rabbitmq-c/archive/refs/tags/v%s.tar.gz" -if [ "${STACK}" = "scalingo-18" ]; then - version="0.11.0" -fi +case "${STACK}" in + "scalingo-18") + version="0.11.0" + ;; + "scalingo-20") + version="0.13.0" + ;; + *) + version="${librabbitmq_version}" + ;; +esac build_librabbitmq "${pkgname}" "${version}" "${source_url}" "${librabbitmq_prefix}" # amqp # https://pecl.php.net/package/amqp -# `$version` is loaded from the buildpack.conf file. - +# Default `$version` is loaded from the buildpack.conf file. pkgname="amqp" -version="${amqp_version}" source_url="https://pecl.php.net/get/amqp-%s.tgz" +case "${STACK}" in + "scalingo-18") + version="1.11.0" + ;; + *) + version="${amqp_version}" + ;; +esac + build_amqp "${pkgname}" "${version}" "${source_url}" "${librabbitmq_prefix}" cp "${pkgname}-${version}/modules/amqp.so" "${EXT_DIR}/amqp.so" echo "extension=amqp.so" > "${PREFIX}/etc/conf.d/amqp.ini" +# Versions breakdown: +# +# | Stack | amqp | librabbitmq | +# | ----------- | ------ | ----------- | +# | scalingo-22 | 2.1.2 | 0.14.0 | +# | scalingo-20 | 2.1.2 | 0.13.0 | +# | scalingo-18 | 1.11.0 | 0.11.0 | +# + # Cleanup