Experimental project

This is a sandbox project, which contains experimental code for developer use only.

This is a DRUSH command that makes it easy for you to enable/disable modules, set permissions, and set variables depending on your current environment. Basically, this solves the problem of "I want devel enabled on DEV but not on PROD."

INSTALLATION

  • Install the environment.drush.inc file in your sites/all/drush folder
  • Add something like the following to your sites/all/drush/drushrc.php file
/*
// Add this to your drushrc file and modify as needed.
// The option key MUST be enviroments.
$options['environments'] = array(
  // #key = The enviroment name.
  'development' => array(
    // The list of modules to enabled (1) or disable (0).
    'modules' => array(
      'views_ui' => 1,
      'context_ui' => 1,
      'devel' => 1,
      'theme_developer' => 0,
    ),
    // The list of variables to configure.
    'settings' => array(
      'preprocess_css' => 0,
      'preprocess_js' => 0,
    ),
    // The list of roles to grant (1) and revoke (0) on a per role basis.
    'permissions' => array(
      'Administrator' => array (
        'administer features' => 1,
        'administer permissions' => 1,
      ),
      'anonymous user' => array (
        'administer features' => 0,
        'administer permissions' => 0,
      )
    ),
  ),
);
*/

NOTE: A good chunk of the code for this drush command was stole...er...borrowed from Eric Duran

Project Information