example.drushrc.php

  1. 8.0.x examples/example.drushrc.php
  2. 6.x examples/example.drushrc.php
  3. 7.x examples/example.drushrc.php
  4. 3.x examples/example.drushrc.php
  5. 4.x examples/example.drushrc.php
  6. 5.x examples/example.drushrc.php
  7. master examples/example.drushrc.php

File

examples/example.drushrc.php
View source
  1. <?php
  2. /*
  3. * Examples of valid statements for a drushrc.php file. Use this file to cut down on
  4. * typing of options and avoid mistakes.
  5. *
  6. * Rename this file to drushrc.php and optionally copy it to one of
  7. * five convenient places, listed below in order of precedence:
  8. *
  9. * 1. Drupal site folder (e.g sites/{default|example.com}/drushrc.php).
  10. * 2. Drupal installation root.
  11. * 3. In any location, as specified by the --config (-c) option.
  12. * 4. User's .drush folder (i.e. ~/.drush/drushrc.php).
  13. * 5. System wide configuration folder (e.g. /etc/drush/drushrc.php).
  14. * 6. Drush installation folder.
  15. *
  16. * If a configuration file is found in any of the above locations, it
  17. * will be loaded and merged with other configuration files in the
  18. * search list.
  19. *
  20. * If you have some configuration options that are specific to a
  21. * particular version of drush, then you may place them in a file
  22. * called drush5rc.php. The version-specific file is loaded in
  23. * addtion to, and after, the general-purpose drushrc.php file.
  24. * Version-specific configuration files can be placed in any of the
  25. * locations specified above.
  26. *
  27. * IMPORTANT NOTE on configuration file loading:
  28. *
  29. * At its core, drush works by "bootstrapping" the Drupal environment
  30. * in very much the same way that is done during a normal page request
  31. * from the web server, so most drush commands run in the context
  32. * of a fully-initialized website.
  33. *
  34. * Configuration files are loaded in the reverse order they are
  35. * shown above. Configuration files #6 through #3 are loaded immediately;
  36. * the configuration file stored in the Drupal root is loaded
  37. * when Drupal is initialized, and the configuration file stored
  38. * in the site folder is loaded when the site is initialized.
  39. *
  40. * This load order means that in a multi-site environment, the
  41. * configuration file stored in the site folder will only be
  42. * available for commands that operate on that one particular
  43. * site. Additionally, there are some drush commands such as
  44. * pm-download do not bootstrap a drupal environment at all,
  45. * and therefore only have access to configuration files #6 - #3.
  46. * The drush commands 'rsync' and 'sql-sync' are special cases.
  47. * These commands will load the configuration file for the site
  48. * specified by the source parameter; however, they do not
  49. * load the configuration file for the site specified by the
  50. * destination parameter, nor do they load configuration files
  51. * for remote sites.
  52. *
  53. * See `drush topic docs-bootstrap` for more information on how
  54. * bootstrapping affects the loading of drush configuration files.
  55. */
  56. // Specify a particular multisite.
  57. # $options['l'] = 'http://example.com/subir';
  58. // Specify your Drupal core base directory (useful if you use symlinks).
  59. # $options['r'] = '/home/USER/workspace/drupal-6';
  60. // Load a drushrc.php configuration file from the current working directory.
  61. # $options['c'] = '.';
  62. // You should not use drush-4.x on Windows; upgrade to the 5.x branch.
  63. // If you are really sure that you want to ignore this advice, you may
  64. // still disable the warning by setting the 'check_os' setting to the
  65. // special value shown below.
  66. # $options['check_os'] = 'i-want-4.x';
  67. // Control automatically check for updates in pm-updatecode and drush version.
  68. // FALSE = never check for updates. 'head' = allow updates to drush-HEAD.
  69. // TRUE (default) = allow updates to latest stable release.
  70. # $options['self-update'] = FALSE;
  71. // By default, drush will download projects compatibile with the
  72. // current version of Drupal, or, if no Drupal site is specified,
  73. // then the Drupal-7 version of the project is downloaded. Set
  74. // default-major to select a different default version.
  75. # $options['default-major'] = 6;
  76. // Specify CVS for checkouts
  77. # $options['package-handler'] = 'cvs';
  78. // Specify CVS credentials for checkouts (requires --package-handler=cvs)
  79. # $options['cvscredentials'] = 'name:password';
  80. // Specify additional directories to search for *.drush.inc files
  81. // Separate by : (Unix-based systems) or ; (Windows).
  82. # $options['i'] = 'sites/default:profiles/myprofile';
  83. // Specify modules to ignore when searching for *.drush.inc files
  84. // inside a Drupal site
  85. # $options['ignored-modules'] = array('module1', 'module2');
  86. // Specify additional directories to search for *.alias.drushrc.php
  87. // and *.aliases.drushrc.php files
  88. # $options['alias-path'] = '/path/to/aliases:/path2/to/more/aliases';
  89. // Specify directory where sql-sync will store persistent dump files.
  90. // Keeping the dump files around will improve the performance of rsync
  91. // when the database is rsync'ed to a remote system. If a dump directory
  92. // is not specified, then sql-sync will store dumps in temporary files.
  93. # $options['dump-dir'] = '/path/to/dumpdir';
  94. // Specify directory where sql-dump should store backups of database
  95. // dumps. @DATABASE is replaced with the name of the database being
  96. // dumped, and @DATE is replaced with the current time and date of the
  97. // dump. TRUE will cause sql-dump to use the same backup directory that
  98. // pm-updatecode does.
  99. //
  100. // If set, this can be explicitly overridden by specifying --result-file
  101. // on the commandline. The default behavior of dumping to
  102. // STDOUT can be achieved via --result-file=0
  103. # $options['result-file'] = '/path/to/backup/dir/@DATABASE_@DATE.sql';
  104. # $options['result-file'] = TRUE;
  105. // Enable verbose mode.
  106. # $options['v'] = 1;
  107. // Show database passwords in 'status' and 'sql-conf' commands
  108. # $options['show-passwords'] = 1;
  109. // Default logging level for php notices. Defaults to "notice"; set to "warning"
  110. // if doing drush development. Also make sure that error_reporting is set to E_ALL
  111. // in your php configuration file. See 'drush status' for the path to your php.ini file.
  112. # $options['php-notices'] = 'warning';
  113. // Specify options to pass to ssh in backend invoke. (Default is to prohibit password authentication; uncomment to change)
  114. # $options['ssh-options'] = '-o PasswordAuthentication=no';
  115. // rsync version 2.6.8 or earlier will give an error message:
  116. // "--remove-source-files: unknown option". To fix this, set
  117. // $options['rsync-version'] = '2.6.8'; (replace with the lowest
  118. // version of rsync installed on any system you are using with
  119. // drush). Note that drush requires at least rsync version 2.6.4
  120. // for some functions to work correctly.
  121. //
  122. // Note that this option can also be set in a site alias. This
  123. // is preferable if newer versions of rsync are available on some
  124. // of the systems you use.
  125. // See: http://drupal.org/node/955092
  126. # $options['rsync-version'] = '2.6.9';
  127. /*
  128. * The output charset suitable to pass to iconv PHP function as out_charset
  129. * parameter. Drush will convert its output from UTF-8 to the charset specified
  130. * here. It is possible to use //TRANSLIT and //IGNORE charset name suffixes
  131. * (see iconv documentation). If not defined conversion will not be performed.
  132. */
  133. # $options['output_charset'] = 'ISO-8859-1';
  134. # $options['output_charset'] = 'KOI8-R//IGNORE';
  135. # $options['output_charset'] = 'ISO-8859-1//TRANSLIT';
  136. /*
  137. * Multiple command execution options
  138. */
  139. // By default, drush will prepend the name of the
  140. // site to the output of any multiple-site command
  141. // execution. To disable this behavior, set the
  142. // --no-label option
  143. # $options['no-label'] = TRUE;
  144. /*
  145. * Customize this associative array with your own tables. This is the list of
  146. * tables whose *data* is skipped by the 'sql-dump' and 'sql-sync' commands when
  147. * a structure-tables-key is provided. You may add new tables to the existing
  148. * array or add a new element.
  149. */
  150. $options['structure-tables'] = array(
  151. 'common' => array('cache', 'cache_filter', 'cache_menu', 'cache_page', 'history', 'sessions', 'watchdog'),
  152. );
  153. /*
  154. * Customize this associative array with your own tables. This is the list of
  155. * tables that are entirely omitted by the 'sql-dump' and 'sql-sync' commands
  156. * when a skip-tables-key is provided. This is useful if your database contains
  157. * non Drupal tables used by some other application or during a migration for
  158. * example. You may add new tables to the existing array or add a new element.
  159. */
  160. $options['skip-tables'] = array(
  161. 'common' => array('migration_data1', 'migration_data2'),
  162. );
  163. /*
  164. * Command-specific options
  165. *
  166. * To define options that are only applicable to certain commands,
  167. * make an entry in the 'command-specific' structures as shown below.
  168. * The name of the command may be either the command's full name
  169. * or any of the command's aliases.
  170. *
  171. * Options defined here will be overridden by options of the same
  172. * name on the command line. Unary flags such as "--verbose" are overridden
  173. * via special "--no-xxx" options (e.g. "--no-verbose").
  174. *
  175. * Limitation: If 'verbose' is set in a command-specific option,
  176. * it must be cleared by '--no-verbose', not '--no-v', and visa-versa.
  177. */
  178. # $command_specific['rsync'] = array('verbose' => TRUE);
  179. # $command_specific['dl'] = array('cvscredentials' => 'user:pass');
  180. // Specify additional directories to search for scripts
  181. // Separate by : (Unix-based systems) or ; (Windows).
  182. # $command_specific['script']['script-path'] = 'sites/all/scripts:profiles/myprofile/scripts';
  183. // Always show release notes when running pm-update or pm-updatecode
  184. # $command_specific['pm-update'] = array('notes' => TRUE);
  185. # $command_specific['pm-updatecode'] = array('notes' => TRUE);
  186. // List of drush commands or aliases that should override built-in
  187. // shell functions and commands; otherwise, built-ins override drush
  188. // commands. Default is help,dd,sa.
  189. // Warning: bad things can happen if you put the wrong thing here
  190. // (e.g. eval, grep), so be cautious.
  191. // If a drush command overrides a built-in command (e.g. bash help),
  192. // then you can use the `builtin` operator to run the built-in version
  193. // (e.g. `builtin help` to show bash help instead of drush help.)
  194. // If a drush command overrides a shell command (e.g. grep), then
  195. // you can use the regular shell command by typing in the full path
  196. // to the command (e.g. /bin/grep).
  197. # $command_specific['core-cli'] = array('override' => 'help,dd,sa');
  198. /**
  199. * Variable overrides:
  200. *
  201. * To override specific entries in the 'variable' table for this site,
  202. * set them here. Any configuration setting from the 'variable'
  203. * table can be given a new value. We use the $override global here
  204. * to make sure that changes from settings.php can not wipe out these
  205. * settings.
  206. *
  207. * Remove the leading hash signs to enable.
  208. */
  209. # $override = array(
  210. # 'site_name' => 'My Drupal site',
  211. # 'theme_default' => 'minnelli',
  212. # 'anonymous' => 'Visitor',
  213. # );
  214. // Load a drushrc.php file from the 'drush' folder at the root
  215. // of the current git repository. Customize as desired.
  216. // (Script by grayside; @see: http://grayside.org/node/93)
  217. #exec('git rev-parse --git-dir 2> /dev/null', $output);
  218. #
  219. #if (!empty($output)) {
  220. # $repo = $output[0];
  221. # $options['config'] = $repo . '/../drush/drushrc.php';
  222. # $options['include'] = $repo . '/../drush';
  223. #}