From 1c54f592ad5cdf1be57426a2577c42a427046765 Mon Sep 17 00:00:00 2001 From: Benjamin Calef Date: Sun, 25 Oct 2020 23:03:01 +0100 Subject: [PATCH] [#73] lock composer to version 1.x --- README.md | 2 +- provision/010-system-packages.sh | 5 +++-- provision/100-magento-pre.sh | 13 ++----------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 7b934be..bae1496 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![vagrant](https://img.shields.io/badge/vagrant-debian:stretch-blue.svg?longCache=true&style=flat&label=vagrant&logo=vagrant)](https://app.vagrantup.com/debian/boxes/stretch64) [![dev-box](https://img.shields.io/badge/git/composer-blue.svg?longCache=true&style=flat&label=setup&logo=magento)](https://github.com/zepgram/magento2-fast-vm/blob/master/config.yaml.example) [![mount](https://img.shields.io/badge/nfs/rsync-blue.svg?longCache=true&style=flat&label=mount)](https://github.com/zepgram/magento2-fast-vm/releases) -[![release](https://img.shields.io/badge/release-v1.3.6-blue.svg?longCache=true&style=flat&label=release)](https://github.com/zepgram/magento2-fast-vm/releases) +[![release](https://img.shields.io/badge/release-v1.3.7-blue.svg?longCache=true&style=flat&label=release)](https://github.com/zepgram/magento2-fast-vm/releases) [![license](https://img.shields.io/badge/license-MIT-blue.svg?longCache=true&style=flat&label=license)](https://github.com/zepgram/magento2-fast-vm/blob/master/LICENSE) ![windows](https://img.shields.io/badge/windows-ok-green.svg?longCache=true&style=flat&label=windows&logo=windows) diff --git a/provision/010-system-packages.sh b/provision/010-system-packages.sh index 417c088..f84d0d5 100644 --- a/provision/010-system-packages.sh +++ b/provision/010-system-packages.sh @@ -44,6 +44,7 @@ echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.li # Percona repository wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb +rm -f percona-release_latest.$(lsb_release -sc)_all.deb # Elasticsearch repository wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - @@ -66,8 +67,8 @@ if $(dpkg --compare-versions "${PROJECT_PHP_VERSION}" "lt" "7.2"); then apt-get install -y php"${PROJECT_PHP_VERSION}"-mcrypt fi -# Composer -curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +# Composer v1.x +curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --1 # Prestissimo speed up installation sudo -u vagrant composer global require hirak/prestissimo diff --git a/provision/100-magento-pre.sh b/provision/100-magento-pre.sh index 627729b..a8b04d9 100644 --- a/provision/100-magento-pre.sh +++ b/provision/100-magento-pre.sh @@ -64,17 +64,8 @@ chmod 600 /home/vagrant/.ssh/id_rsa.pub rm -rf /home/vagrant/.ssh/known_hosts /home/vagrant/.ssh/config echo -e "StrictHostKeyChecking no\n" >> /home/vagrant/.ssh/config ssh-keyscan -t rsa "${PROJECT_HOST_REPOSITORY}" >> /home/vagrant/.ssh/known_hosts -mkdir -p /home/vagrant/.composer -cat <<-EOF > /home/vagrant/.composer/auth.json -{ - "http-basic": { - "repo.magento.com": { - "username": "${PROJECT_COMPOSER_USER}", - "password": "${PROJECT_COMPOSER_PASS}" - } - } -} -EOF +composer config --global http-basic.repo.magento.com "${PROJECT_COMPOSER_USER}" "${PROJECT_COMPOSER_PASS}" +sudo -u vagrant composer config --global http-basic.repo.magento.com "${PROJECT_COMPOSER_USER}" "${PROJECT_COMPOSER_PASS}" # Git global config if [ "$PROJECT_SOURCE" != "composer" ]; then