Drush Make: A different approach to Drush

By Bill Seremetis, 10 March, 2011

 

I've been using Drush for a long time, but I never tried Drush Make until now. Drush Make is an addon to Drush that allows you to build a website from a .make file downloading required files from various sources. Drush make will parse the .make file and will follow all directions in it. The readme file of drush make explains its capabilities in great detail:
 
Downloading Drupal core, as well as contrib modules from drupal.org.
  • Checking code out from CVS, SVN, git, and bzr repositories.
  • Getting plain `.tar.gz` and `.zip` files (particularly useful for libraries that can not be distributed directly with drupal core or modules).
  • Fetching and applying patches.
  • Fetching modules, themes, and installation profiles, but also external libraries.
 
After downloading all specified files drush make can also:
  • create the /files and settings.php file (using --prepare-install)
  • download translations for all projects
  • create a .tar file of all the above so that you can can start building your site in no time.
 
So why is it so important? We already had ftp, wget + untar, drush dl to download all of the above!
Drush make isn't a replacement to all of them, it is an addon, and a wonderful one I must say. You can use .make files to create a list of the modules you use in all of of your projects (views, cck, admin_menu etc.) and/or you can have more .make files sorted by functionallity of the resulting website. Create a base.make with all the must-have-tools and then create a seo.make with the modules required for SEO, an ecommerce.make file that will store what you need to build an ecommerce site with Ubercart (for example I need payment modules for greek banks to all my ecommerce sites) and so on.
Drush make even allows you to include .make files in other .make files, just like programming languages do.
 
Last but not least drush make can try and create a .make file from an existing drupal installation. Although this function can't do anything and it requires some typing, it is usefull nontheless. A scenario for this ability is that you have just settled your mind on what modules you are going to use for a project but you were working on your local dev-machine. By creating a .make file you can re-create your drupal directory on another machine or share it with other users, on your team or on drupal.org!
 
Be sure to give drush make a try, I'm sure you wan't regret it. This of course implies that you are already using drush. You are using drush, right?