Converting the Drupal Script Library to use Drush based deployments

Ok.  So I just finished rewriting my Drupal Script Library for the second time.

The first time was the rewrite to use a Git based install rather than using CVS.

This time, I got rid of the SCM checkout meme altogether and switched over to using 'drush dl' to deploy new modules.

There are some things I miss about not using CVS/Git/whatever to retrieve code.  Lost is the (easy) ability to see what has changed in a code base.  Lost is the near-trivial means of updating.  (Well, it was trivial w/ CVS -- with Git, less so.)  One thing I won't miss will be the HUGE amounts of needless Git metadata that became part of the installations.  (Useless from a site deployer standpoint, anyway.)  This will certainly speed backups.

You may ask why I have a script to do drupal/module updates at all if I'm just wrapping 'drush dl'.  I find my scripts easier to use, generally.  They also do a fair amount of pre-validation before performing operations.  This validation has saved me more than a few times.  Additionally, they leverage my preferred drupal site structure and are available from anywhere on the path (i.e. I don't have to use a cwd inside a site deployment to operate on the site.)  YMMV, of course.

Notable changes:

  • The script 'drupalGitDeploy.sh' has been renamed to 'drupalDeploy.sh'.  (Could have been drupalDrushDeploy.sh, I guess; but I chose to make it shorter.)  The script is a wrapper for 'drush dl' and uses the same format for module names.
  • The script 'drupalMigrateCVSToGit.sh' has been renamed to 'drupalMigrateToDrush.sh' and will now migrate both CVS and Git based installs to the new Drush install mechanism.
  • The status report in 'drupalReport.sh' now uses 'drush pm-updatecode -n' to display update availability.

 

Free Tag: