download 1.3 KB

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env bash
  2. VERSION=${1:-2.4.6-p3}
  3. EDITION=${2:-community}
  4. bin/stop
  5. bin/start --no-dev
  6. [ $? != 0 ] && echo "Failed to start Docker services" && exit
  7. bin/setup-composer-auth
  8. bin/fixowns
  9. if [ "$EDITION" == "mageos-nightly" ]; then
  10. bin/clinotty composer create-project --stability alpha --repository-url=https://upstream-nightly.mage-os.org magento/project-community-edition .
  11. elif [ "$EDITION" == "mageos-mirror" ] || [ "$EDITION" == "mageos" ]; then
  12. bin/clinotty composer create-project --repository-url=https://mirror.mage-os.org magento/project-community-edition="${VERSION}" .
  13. elif [ "$EDITION" == "mageos-hypernode-mirror" ]; then
  14. bin/clinotty composer create-project --repository-url=https://mage-os.hypernode.com/mirror magento/project-community-edition="${VERSION}" .
  15. elif [ "$EDITION" == "mageos-maxcluster-mirror" ]; then
  16. bin/clinotty composer create-project --repository-url=https://mage-os.maxcluster.net/mirror magento/project-community-edition="${VERSION}" .
  17. else
  18. bin/clinotty composer create-project --repository=https://repo.magento.com/ magento/project-"${EDITION}"-edition="${VERSION}" .
  19. fi
  20. bin/clinotty [ ! -f "./var/composer_home/auth.json" ] && bin/clinotty mkdir -p ./var/composer_home && bin/clinotty cp /var/www/.composer/auth.json ./var/composer_home/auth.json