Posted by benklocek on June 5, 2010 at 7:49pm
How do you use Variable overrides in drushrc.php?
I've got a few ideas from the examples of variables overrides, but I'm curious what uses everyone is using it in dev or production.
I could see using it to set the site title to "DEV" or something, any thing else?

Comments
I'm not sure what variable
I'm not sure what variable overrides are for in drushrc.php. These will not affect your site as viewed through the web server (web browser); for that, set the variable overrides in settings.php.
Scenarios where drushrc.php file(s) help with Drupal development
Scenarios where custom
drushrc.phpfile(s) can help with development workflows:drushrc.phpfiles so certain paths/options are set differently.drushrc.phpfile for all local sites.-voption for Drush, and this can be set as a default insidedrushrc.php.dl) configurations like add your SCM credentials.Chris Charlton, Author & Drupal Community Leader, Enterprise Level Consultant
I teach you how to build Drupal Themes http://tinyurl.com/theme-drupal and provide add-on software at http://xtnd.us
What about site aliases
Isn't that what site aliases rc files are supposed to do?
All my drushrc files are the same usually.
I use the
variable to figure out where the site is and call a function to set any drush options that are location specific such as 'r'.
This allows all my drushrc files to look the same on dev and production, unless I'm deviating from my usual conventions.
drushrc.php
require_once('c:/drush/conventions.inc');$drushrc_file_location = __FILE__;
$options = drush_options($drushrc_file_location);
I do the same type of switching with my settings.php and name all my dev sites with dev.X.X hostnames so the php knows which db, files path etc to use on dev and production with identical settings.php files.
I have a global $dev variable set in settings.php if the domain starts with dev. that triggers "dev" in the body class and a big "DEV" foreground image in the CSS with high opacity. This helps me avoid confusion more often than others.
Having identical settings.php and drushrc files makes dev and production codebase just a little easier to script back and forth, diff, and do version control.
www.johnbarclay.com