gearman extension feature
This commit is contained in:
parent
cfa7bc51cd
commit
a5e13fab3b
@ -52,6 +52,9 @@ describe('Extension tests', () => {
|
||||
linux = await extensions.addExtension('phalcon4', '7.4', 'linux');
|
||||
expect(linux).toContain('phalcon.sh 4.0.x 7.4');
|
||||
|
||||
linux = await extensions.addExtension('gearman', '7.3', 'linux');
|
||||
expect(linux).toContain('gearman.sh gearman2.0.6 7.3');
|
||||
|
||||
linux = await extensions.addExtension('xdebug', '7.2', 'fedora');
|
||||
expect(linux).toContain('Platform fedora is not supported');
|
||||
});
|
||||
|
||||
@ -106,6 +106,18 @@ export async function addExtensionLinux(
|
||||
version +
|
||||
' >/dev/null 2>&1';
|
||||
break;
|
||||
case '7.0gearman':
|
||||
case '7.1gearman':
|
||||
case '7.2gearman':
|
||||
case '7.3gearman':
|
||||
// case '7.4gearman': // no 7.4 support for now, hope for 2.0.7
|
||||
install_command =
|
||||
'sh ' +
|
||||
path.join(__dirname, '../src/scripts/gearman.sh') +
|
||||
' gearman-2.0.6' +
|
||||
version +
|
||||
' >/dev/null 2>&1'
|
||||
break;
|
||||
default:
|
||||
install_command =
|
||||
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php' +
|
||||
|
||||
11
src/scripts/gearman.sh
Normal file
11
src/scripts/gearman.sh
Normal file
@ -0,0 +1,11 @@
|
||||
ini_file=$(php --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g")
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$2"-dev
|
||||
for tool in php-config phpize; do
|
||||
if [ -e "/usr/bin/$tool$2" ]; then
|
||||
sudo update-alternatives --set $tool /usr/bin/"$tool$2"
|
||||
fi
|
||||
done
|
||||
|
||||
cd ~ && git clone --depth=1 -v https://github.com/wcgallego/pecl-gearman.git -b "$1"
|
||||
cd pecl-gearman && /usr/bin/phpize"$2" && ./configure && make && sudo make install
|
||||
echo "extension=gearman.so" >> "$ini_file"
|
||||
Loading…
x
Reference in New Issue
Block a user