mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 11:51:07 +07:00
Add support to specify couchbase version
This commit is contained in:
parent
6f83b63bf5
commit
1dfe0dc4a4
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -243,7 +243,7 @@ async function addExtensionDarwin(extension_csv, version) {
|
||||
add_script += await utils.parseExtensionSource(extension, ext_prefix);
|
||||
return;
|
||||
case /^(5\.[3-6]|7\.[0-4]|8\.[0-1])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension):
|
||||
case /^couchbase$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(extension):
|
||||
case /^couchbase|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(extension):
|
||||
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
|
||||
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4/.test(version_extension):
|
||||
case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension):
|
||||
@ -357,7 +357,7 @@ async function addExtensionLinux(extension_csv, version) {
|
||||
return;
|
||||
case /^(5\.[3-6]|7\.[0-4]|8\.[0-1])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$|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(extension):
|
||||
case /^couchbase|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(extension):
|
||||
case /(?<!5\.[3-5])intl-[\d]+\.[\d]+$/.test(version_extension):
|
||||
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
|
||||
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):
|
||||
|
@ -39,7 +39,7 @@ export async function addExtensionDarwin(
|
||||
case /^(5\.[3-6]|7\.[0-4]|8\.[0-1])blackfire(-\d+\.\d+\.\d+)?$/.test(
|
||||
version_extension
|
||||
):
|
||||
case /^couchbase$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(
|
||||
case /^couchbase|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(
|
||||
extension
|
||||
):
|
||||
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
|
||||
@ -262,7 +262,7 @@ export async function addExtensionLinux(
|
||||
case /^((5\.[3-6])|(7\.[0-2]))pdo_cubrid$|^((5\.[3-6])|(7\.[0-4]))cubrid$/.test(
|
||||
version_extension
|
||||
):
|
||||
case /^couchbase$|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(
|
||||
case /^couchbase|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(
|
||||
extension
|
||||
):
|
||||
case /(?<!5\.[3-5])intl-[\d]+\.[\d]+$/.test(version_extension):
|
||||
|
@ -1,8 +1,9 @@
|
||||
# Function to install libraries required by couchbase
|
||||
add_couchbase_clibs() {
|
||||
ext=$1
|
||||
if [ "$(uname -s)" = "Linux" ]; then
|
||||
trunk="https://github.com/couchbase/libcouchbase/releases"
|
||||
if [[ ${version:?} =~ 5.[3-6]|7.[0-1] ]]; then
|
||||
if [[ "$ext" =~ couchbase-2.+ ]]; then
|
||||
release="2.10.9"
|
||||
else
|
||||
release="$(curl -sL $trunk/latest | grep -Eo "libcouchbase-[0-9]+\.[0-9]+\.[0-9]+" | head -n 1 | cut -d'-' -f 2)"
|
||||
@ -15,7 +16,7 @@ add_couchbase_clibs() {
|
||||
install_packages libev4 libevent-dev
|
||||
sudo dpkg -i /tmp/libcouchbase-*/*.deb
|
||||
else
|
||||
if [[ ${version:?} =~ 5.[3-6]|7.[0-1] ]]; then
|
||||
if [[ "$ext" =~ couchbase-2.+ ]]; then
|
||||
brew install libcouchbase@2
|
||||
brew link --overwrite --force libcouchbase@2
|
||||
else
|
||||
@ -64,9 +65,12 @@ get_couchbase_version() {
|
||||
|
||||
# Function to add couchbase.
|
||||
add_couchbase() {
|
||||
couchbase_version=$(get_couchbase_version)
|
||||
if [ "$couchbase_version" != 'couchbase' ]; then
|
||||
add_couchbase_clibs >/dev/null 2>&1
|
||||
ext=$1
|
||||
if [ "$ext" = "couchbase" ]; then
|
||||
ext=$(get_couchbase_version)
|
||||
fi
|
||||
if [[ "$ext" =~ couchbase-[2-3].+ ]]; then
|
||||
add_couchbase_clibs "$ext" >/dev/null 2>&1
|
||||
else
|
||||
add_couchbase_cxxlibs >/dev/null 2>&1
|
||||
fi
|
||||
@ -74,7 +78,7 @@ add_couchbase() {
|
||||
if check_extension "couchbase"; then
|
||||
add_log "${tick:?}" "couchbase" "Enabled"
|
||||
else
|
||||
pecl_install "${couchbase_version}" >/dev/null 2>&1
|
||||
pecl_install "${ext}" >/dev/null 2>&1
|
||||
add_extension_log "couchbase" "Installed and enabled"
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user