You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

initBenchmark.sh 638B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env bash
  2. function clearCacheAndLogs() {
  3. rm -rf var/cache/*
  4. [ "$?" != "0" ] && exit 1
  5. chmod -R 777 var/cache
  6. [ "$?" != "0" ] && exit 1
  7. rm -rf var/log/*
  8. [ "$?" != "0" ] && exit 1
  9. chmod -R 777 var/log
  10. [ "$?" != "0" ] && exit 1
  11. }
  12. function initBenchmark() {
  13. # because of Symfony Flex bug (https://github.com/symfony/symfony/issues/29581), we need to remove vendor
  14. rm -rf vendor/
  15. clearCacheAndLogs
  16. composer install --no-dev --classmap-authoritative
  17. [ "$?" != "0" ] && exit 1
  18. clearCacheAndLogs
  19. php bin/console cache:warmup
  20. [ "$?" != "0" ] && exit 1
  21. return 0
  22. }