Drush Make (as of Drush version 5) is now included in Drush, the command line tool for Drupal (or follow this link to the Drush handbook page for more information on how to use Drush itself).

Drush Make was previously a separate project and had its own separate project page: http://drupal.org/project/drush_make

What Drush Make does is, through the implementation of flat files (similar in appearance to .info files from modules), provide a mechanism to fetch data from practically any source you tell it to, and package it. This includes downloading Drupal core as well as other contributed modules available on drupal.org.

For details on config files, see Managing Drush make files for an installation profile.

It also provides the ability to fetch:

  • code from git repos, including tag-specific
  • ditto for svn
  • ditto for git, including checking out a particular branch after cloning the repo
  • grabs .tar.gz stuff, wget-style - useful for libraries
  • can fetch and apply patches

The package created can then be used for distribution or as a platform build that can then be deployed and instancified/cloned using the Aegir hosting system.

A typical Drush make file could look something like the following:

my_own_distribution.build

core = 6.x
projects[] =  drupal
projects[my_own_distribution][type] = "profile"
projects[my_own_distribution][download][type] = "git"
projects[my_own_distribution][download][url] = "git@git.example.com:/drupal/profiles/my_own_distribution"
projects[my_own_distribution][download][branch] = "build_2009101601"

Execute using:

Drush make [build file].build [target]
Eg: Drush make my_own_distribution.build /var/aegir/drupal-6.14_build_2009101601

Drush is also capable of recursing through the content defined in the make file and, if found, execute other included make files. This makes for a flexible and expandable build system where packages can be expanded using already available build files.

Using the previous my_own_distribution.build example, one could have the following make file tucked inside the my_own_distribution profile:

my_own_distribution.make

core = 6.x
projects[] = admin_menu
projects[] = pathauto
projects[] = token
projects[] = views
projects[] = cck

This would also fetch and add the above modules, from Drupal.org module repository, and package them with the profile and Drupal core.

Related content:

  • An article describing the combined usage of Drush Make, Aegir and version control for deploying Drupal projects.
  • Slides of a session about a development environment set-up with Drush and Drush make.

Comments

doublejosh’s picture

I'm creating a Make Maker to manage my make file and do inheritance. It also autocompletes project names and allows you to cluster them into components.

http://betterwebshop.com/make

This is not complete, and is still missing the download make file step (arguably something which should have been done first.) There is also a UI bug when clicking "add another item" within a component, it deletes the other items... so you're stuck adding one module at a time and saving... or making a bunch of space at first.

Anyone like it and want to help?

Anonymous’s picture

This post should have the URL link crossed out it is no longer valid.

jlscott’s picture

I need a method of changing permissions on a directory after it has been installed by drush using a make file within the Aegir framework when creating a platform. I am unable to find any way to do this, except by manually executing a "chmod" command after the event (or running a bash script) from a terminal session to the server.

The secnario is that my make file installs the module "print", which requires a PDF generation library. I use "dompdf", which is specified in the makefile and so is downloaded and installed by drush (in the "lib" directory of the print module). Following installation, the directory "modules/print/lib/dompdf/lib/fonts" needs to made writable by the webserver, for the generation of PDF copies of pages to be performed correctly.

Is there any way to have this step performed as part of the drush install? Is there a make-file entry to do this, or is there a drush command that can be executed by Aegir following the execution of the make-file?

Thanks.