Skip to content

Instantly share code, notes, and snippets.

@agentrickard
Created August 16, 2014 18:29
Show Gist options
  • Save agentrickard/27b83d78109565ae1a16 to your computer and use it in GitHub Desktop.
Save agentrickard/27b83d78109565ae1a16 to your computer and use it in GitHub Desktop.
Sampe Drupal 8 build script
#!/bin/bash
# be in the right directory
# edit this line as appropriate
cd /Applications/MAMP/htdocs
# assign the path to drush.
# if drush is not in your path, or if you use multiple versions.
drush='/Applications/MAMP/drush/drush'
# clear the old stuff
sudo rm -rf drupal-8
echo 'Sudo password needed to delete files'
echo 'Removed old files.'
# clear the db, since drush is breaking right now.
# see https://drupal.org/node/2057365#comment-7733235
echo 'Dropping database.'
mysql -u test -ptest -e "DROP DATABASE drupal8;"
echo 'Creating database.'
mysql -u test -ptest -e "CREATE DATABASE drupal8 CHARACTER SET utf8 COLLATE utf8_general_ci;"
# clone the code
git clone --recursive --branch 8.0.x http://git.drupal.org/project/drupal.git drupal-8
# try to install
echo 'Setting permissions on default directory.'
cd drupal-8/sites
chmod a+w default
cd ../
# main install
$drush si standard --db-url=mysql://test:test@localhost:8889/drupal8 --account-pass="admin" --site-name="Drupal 8" -y
$drush dl devel --destination='modules'
$drush en simpletest devel -y
#### sample code ####
# install test modules
#cd modules
#git clone --recursive https://github.com/palantirnet/violator_block.git emergency_block
# create a test account
#$drush user-create test --mail=test@example.com --password=test
# run tests
# php core/scripts/run-tests.sh --url http://example.com/drupal8 Domain
# get patches for testing.
# curl -0 https://drupal.org/files/issues/2160575-35.patch > 2160575-35.patch
# patch -p1 < 2160575-35.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment