Switch to apt-fast

This commit is contained in:
Shivam Mathur 2019-10-23 03:35:15 +05:30
parent 57a0907a18
commit 75c0e130e8
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
4 changed files with 6 additions and 7 deletions

View File

@ -40,10 +40,10 @@ describe('Extension tests', () => {
'linux'
);
expect(linux).toContain(
'sudo DEBIAN_FRONTEND=noninteractive apt install -y php7.2-xdebug'
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php7.2-xdebug'
);
expect(linux).toContain(
'sudo DEBIAN_FRONTEND=noninteractive apt install -y php7.2-pcov'
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php7.2-pcov'
);
linux = await extensions.addExtension('xdebug, pcov', '7.4', 'linux');

View File

@ -172,7 +172,7 @@ function addExtensionLinux(extension_csv, version) {
break;
default:
install_command =
'sudo DEBIAN_FRONTEND=noninteractive apt install -y php' +
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php' +
version +
'-' +
extension +

View File

@ -165,7 +165,7 @@ export async function addExtensionLinux(
break;
default:
install_command =
'sudo DEBIAN_FRONTEND=noninteractive apt install -y php' +
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php' +
version +
'-' +
extension +

View File

@ -23,11 +23,10 @@ step_log "Setup PHP and Composer"
if [ "$existing_version" != "$1" ]; then
if [ ! -e "/usr/bin/php$1" ]; then
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:ondrej/php -y >/dev/null 2>&1
sudo DEBIAN_FRONTEND=noninteractive apt update -y >/dev/null 2>&1
if [ "$1" != "7.4" ]; then
sudo DEBIAN_FRONTEND=noninteractive apt install -y php"$1" curl php"$1"-curl >/dev/null 2>&1
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$1" curl php"$1"-curl >/dev/null 2>&1
else
sudo DEBIAN_FRONTEND=noninteractive apt install -y php"$1" php"$1"-dev curl php"$1"-curl >/dev/null 2>&1
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$1" php"$1"-dev curl php"$1"-curl >/dev/null 2>&1
fi
status="Installed PHP$version"
fi