$ drush make drupalbristol

July 2014

By Oliver Davies / @opdavies

What is it?

"Drush make is an extension to drush that can create a ready-to-use drupal site, pulling sources from various locations. It does this by parsing a flat text file (similar to a drupal `.info` file) and downloading the sources it describes. In practical terms, this means that it is possible to distribute a complicated Drupal distribution as a single text file."

http://cgit.drupalcode.org/drush_make/plain/README.txt?id=refs/heads/6.x-2.x

Installation (< 5.x)


# Download drush_make from D.O.
$ drush dl drush_make

# Move it into a .drush directory within your HOME.
$ mv drush_make ~/.drush

# Clear the Drush cache.
$ drush cc drush
          

foo.make


core = 7.x
api = 2

projects[drupal][version] = "7.28"

; Modules

; Themes

; Libraries

; Custom modules and theme
          

Modules (contrib)


projects[admin_menu][version] = "3.0-rc4"

# To place the module within a sub-directory.
projects[admin_menu][subdir] = "contrib"
          

Modules (dev releases)


projects[devel_themer][download][type] = "git"
projects[devel_themer][download][revision] = "bec0859"
          

Modules (custom)

This module is being downloaded from it's repository on GitHub.


projects[nomensa_amp_base][type] = "module"
projects[nomensa_amp_base][download][type] = "git"
projects[nomensa_amp_base][download][url] = "https://github.com/opdavies/nomensa-amp-drupal-base.git"
projects[nomensa_amp_base][download][branch] = "7.x"
          

Themes

Ditto.


projects[zen][version] = "5.4"

# This is optional, it seems to work without it.
projects[zen][type] = "theme"
          

Libraries

You can download external libraries by specifying the "get" download type and the download URL.


libraries[ckeditor][download][type] = "get"
libraries[ckeditor][download][url] = "http://download.cksource.com/CKEditor/CKEditor/CKEditor%204.4.1/ckeditor_4.4.1_standard.zip"
          

make-generate

That's great, but I've already got a site built. Then use make-generate.


            $ drush make-generate foo.make
          
## Resources * http://drush.ws/#make * http://drush.ws/#make-generate * https://drupal.org/node/1432374 * https://github.com/opdavies/nomensa-amp-drupal-demo