One-liner for installing a fresh Drupal instance with Yild and contributed providers using a make file.
drush make drupal.make.yml your-drupal-folder-name && \
cd your-drupal-folder-name && \
drush si --db-url=mysql://user:[email protected]:port/your-db-name --site-name="Yild provider development" --yes && \
drush en yild, yild_your_provider_name
- Creates the folder
your-drupal-folder-name
- Installs the latest Drupal 7.x version.
- Installs the Yild module
- Enables Yild and your Yild provider(s)
- Clones all the Yild providers in the
make
file from their respective git repository. - Creates the database:
your-db-name
- Adds the user
admin
to the database, generates a password and prints it to the console. Use--account-pass=your password
to manually set a password.
The --db-url
argument assumes that mysql is installed and in your $PATH.
If you are using MAMP then mysql will not be included in $PATH. Add mysql to your .bash_profile
by adding the following line at the end of the file.
export PATH=$PATH:/Applications/MAMP/Library/bin
Or if using OhMyZsh, then add it to .zshrc
.
- Make sure to edit
your-drupal-folder-name
,user
,pass
,port
andyour-db-name
accordingly. - Edit the list of Yild provider modules in the
drush en
command. - The
--yes
argument will not ask you any questions. Thesi
(--site-install
) command will drop all existing tables without asking if--yes
is used. - Other arguments for the
site-install
command can be found here.
You can also add the following arguments (optional) to use a different user to create the database. It must have GRANT permission:
--db-su=your-user --db-su-pw=your-pass
The providers are now checked out in their respective folders, e.g. sites/all/modules/contrib/yild/modules/providers/yild_your_provider_name
. You can start committing and pushing from any provider folder, given that you have access to that particular Github repo.
Before trashing the drupal folder, make sure you git push
your provider :-D
If --site-install
fails to drop your DB you can do it manually:
drush sql-drop --database=your-db-name --db-url=mysql://user:[email protected]:port/your-db-name --yes