Using drush make for a distribution

I have been hand-compiling a Drupal developer distribution for a while now for my own and according to the stats for some other folks as well. With the new drush make project i can finally do this automatically.

drush make is an extension to the popular drush command line utility, which allows you to interact with drupal.org and your drupal site from the terminal. From updating modules to flushing cache its extremely versatile and extensible. Drush make is a utility that downloads and “compiles” a drupal site based on a site description, or makefile. For instance Development Seed is using this tool for their Open Atrium project.

For the Drupal developer site I use the following makefile which i named developer.make (the name of the file doesn’t really matter):

name = Drupal Developer                                                                                                                                                                                                       
core = 6.x 

projects[] = drupal
projects[] = drupal_developer

; Development related modules
projects[devel][subdir] = development
projects[coder][subdir] = development
projects[simpletest][subdir] = development

; Base themes
projects[clean][subdir] = contrib

; Contributed general modules
projects[admin_menu][subdir] = contrib

and compile it with drush make developer-6.make --tar=drupal_developer. This results in a package drupal_developer.tar.gz, containing all the modules and install profiles (the project called drupal_developer is actually an install profile). Also note that the modules are placed in different directories, helping to keep a neat file structure, allowing to clean up fast when you push the site to production.

Hopefully sometime soon I’ll roll this from a simple shell-script on a weekly basis, needing no intervention from my part.

23 Oct, 2009 BY balazs

Post new comment

The content of this field is kept private and will not be shown publicly.