Skip to content

Commit

Permalink
Merge pull request #7 from whikloj/fix-things
Browse files Browse the repository at this point in the history
Changes for Mysql 8.0
  • Loading branch information
alxp authored Jan 12, 2022
2 parents ba49806 + 9871f76 commit 3a2c098
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions travis_setup_drupal.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
echo "Setup database for Drupal"
mysql -h 127.0.0.1 -u root -e "GRANT ALL PRIVILEGES ON drupal.* To 'drupal'@'%' IDENTIFIED BY 'drupal';"
mysql -h 127.0.0.1 -P 3306 -u root -e "CREATE USER 'drupal'@'%' IDENTIFIED BY 'drupal'; GRANT ALL PRIVILEGES ON drupal.* To 'drupal'@'%'; FLUSH ALL PRIVILEGES;"

echo "Install utilities needed for testing"
mkdir /opt/utils
Expand All @@ -19,7 +19,9 @@ phpcs --config-set installed_paths /opt/utils/vendor/drupal/coder/coder_sniffer

echo "Composer install drupal site"
if [ -z "$DRUPAL_VERSION" ]; then
DRUPAL_VERSION=8.9.11
# Just fail if we don't set a version
echo "DRUPAL_VERSION is not set, exiting"
exit 1
fi
cd /opt
composer create-project drupal/recommended-project:$DRUPAL_VERSION drupal
Expand All @@ -42,7 +44,7 @@ phpenv rehash

echo "Drush setup drupal site"
cd web
drush si --db-url=mysql://drupal:drupal@127.0.0.1/drupal --yes
drush si --db-url=mysql://drupal:drupal@127.0.0.1:3306/drupal --yes
drush runserver 127.0.0.1:8282 &
until curl -s 127.0.0.1:8282; do true; done > /dev/null
echo "Enable simpletest module"
Expand All @@ -66,3 +68,4 @@ rm pdfjs-2.0.943-dist.zip

cd ..
drush -y en pdf

0 comments on commit 3a2c098

Please sign in to comment.