From f8646352c6cac4b216ffa80ed70cf30858a822f4 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sat, 6 Mar 2021 01:37:12 +0530 Subject: [PATCH] Fix gearman setup --- dist/index.js | 4 ++-- src/extensions.ts | 4 ++-- src/scripts/ext/gearman.sh | 17 ++++++++--------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/dist/index.js b/dist/index.js index cbab1f57..489f7b13 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1970,14 +1970,14 @@ async function addExtensionLinux(extension_csv, version) { // match couchbase, pdo_oci, oci8, http, pecl_http // match 5.3ioncube...7.4ioncube, 5.3geos...7.4geos // match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4 - // match 5.6gearman...7.4gearman + // match 5.6gearman...8.1gearman case /^(5\.[3-6]|7\.[0-4]|8\.0)blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension): case /^((5\.[3-6])|(7\.[0-2]))pdo_cubrid$|^((5\.[3-6])|(7\.[0-4]))cubrid$/.test(version_extension): case /^couchbase$|^pdo_oci$|^oci8$|^http|^pecl_http|^pdo_firebird$/.test(extension): case /(?/dev/null 2>&1 - else + add_ppa ondrej/pkg-gearman + install_packages libgearman-dev + enable_extension gearman extension + if ! check_extension gearman; then status="Installed and enabled" - if [ "$DISTRIB_RELEASE" = "16.04" ]; then - sudo "${debconf_fix:?}" apt-get update -y - ${apt_install:?} php"${version:?}"-gearman + if [[ "${version:?}" =~ 5.[3-5] ]]; then + pecl_install gearman-1.1.2 else - ${apt_install:?} libgearman-dev php"${version:?}"-gearman + install_packages php"${version:?}"-gearman || pecl_install gearman fi + enable_extension gearman extension fi }