Update Drupal core and contrib modules with Drush and SVN

Drush has integration with SVN which makes it easy to update a module and automatically commit the new version of the code to SVN.
In this example we use Drush to update a fictional module named "modulename" and then commit the changes to SVN along with a commit message for the SVN log:

drush up modulename --svnsync --svncommit --svnmessage="svn commit message."

To update all outdated Drupal core and contrib modules modules:

Drush integration

If you use Drush you will be delighted to learn that Subs integrates with Drush and exposes a number of useful commands:


subs-cron

Executes subs cron script. Use this to execute the subs cron script independently from Drupal's cron:

drush subs-cron

Since Subs uses Drupal 7's Job Queue API, this can be useful, for example, if you want to make sure that all subscriptions get processed quickly.

Back to top


subs-load

Load and view a subscription. This can be useful to quickly load and inspect a subscription. It accepts two parameters: the subscription's id and a boolean indicating if you want to load the full entity information (defaults to false):

drush subs-load 15

Installing a specific version of a project with drush

To download a specific version of a project, specify the project name, followed by a dash, then the version name. The -y argument answers "yes" to any and all prompts.

drush dl og-1.3 # shortcut for pm-download
drush -y en og # shortcut for pm-enable

alternatively, you can have a specific Drupal version's latest release

drush dl og-7.x

or you can specify a specific version:

Quickly disabling and re-enabling a project with drush

To disable and re-enable a project:

drush -y dis PROJECTNAME; drush -y en PROJECTNAME

If you have Devel installed, there is an additional command available; devel-reinstall which will disable, uninstall, and install a list of projects.

drush -y devel-reinstall PROJECTNAME

Installing drush on openSUSE

The easiest way to install drush on openSUSE is to follow the instructions in: Installing Drush On Any Linux Based Server Out There

If you want a (non-pear) packaged drush version for openSUSE One-click install and command line instructions are found below.

Installing Drush on Windows using Cygwin

This is an alternative way to get Drush running on a Windows 7 system using the Cygwin environment. There is existing documentation on installing and running Drush using GnuWin tools and the native Windows shell at: http://drupal.org/node/594744

Pages

Subscribe with RSS Subscribe to RSS - drush