download 645 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. VERSION=${1:-2.4.4}
  3. EDITION=${2:-community}
  4. bin/stop
  5. # Translate version to root in integer format. Ex. 2.4.3-p1 -> 243
  6. VERSION_ROOT=$(echo "$VERSION" | cut -b 1-5 | sed -e 's/\.//g')
  7. if (( $(echo "$VERSION_ROOT < 244" | bc -l) )); then
  8. sed -i -e 's/8.1\-fpm\-0/7.4\-fpm\-14/g' docker-compose.yml
  9. else
  10. sed -i -e 's/7.4\-fpm\-14/8.1\-fpm\-0/g' docker-compose.yml
  11. fi
  12. docker-compose -f docker-compose.yml up -d
  13. [ $? != 0 ] && echo "Failed to start Docker services" && exit
  14. bin/setup-composer-auth
  15. bin/clinotty composer create-project --repository=https://repo.magento.com/ magento/project-"${EDITION}"-edition="${VERSION}" .