root / .drush / drushrc.php @ 691b7a99
1 |
<?php
|
---|---|
2 |
|
3 |
/**
|
4 |
* Examples of valid statements for a Drush runtime config (drushrc) file.
|
5 |
* Use this file to cut down on typing out lenghty and repetetive command line
|
6 |
* options in the Drush commands you use and to avoid mistakes.
|
7 |
*
|
8 |
* Rename this file to drushrc.php and optionally copy it to one of the places
|
9 |
* listed below in order of precedence:
|
10 |
*
|
11 |
* 1. Drupal site folder (e.g. sites/{default|example.com}/drushrc.php).
|
12 |
* 2. Drupal sites/all/drush folder.
|
13 |
* 3. In any location, as specified by the --config (-c) option.
|
14 |
* 4. User's .drush folder (i.e. ~/.drush/drushrc.php).
|
15 |
* 5. System wide configuration folder (e.g. /etc/drush/drushrc.php).
|
16 |
* 6. Drush installation folder.
|
17 |
*
|
18 |
* If a configuration file is found in any of the above locations, it will be
|
19 |
* loaded and merged with other configuration files in the search list.
|
20 |
*
|
21 |
* If you have some configuration options that are specific to a particular
|
22 |
* version of Drush, then you may place them in a file called drush5rc.php.
|
23 |
* The version-specific file is loaded in addtion to, and after, the general-
|
24 |
* purpose drushrc file. Version-specific configuration files can be placed
|
25 |
* in any of the locations specified above.
|
26 |
*
|
27 |
* IMPORTANT NOTE regarding configuration file on Windows:
|
28 |
*
|
29 |
* For Windows 7, Windows Vista, Windows Server 2008 and later versions is the
|
30 |
* system window configuration folder C:\ProgramData\Drush. For previous
|
31 |
* versions of Windows is the folder C:\Documents and Settings\All Users\Drush.
|
32 |
*
|
33 |
* IMPORTANT NOTE on configuration file loading:
|
34 |
*
|
35 |
* At its core, Drush works by "bootstrapping" the Drupal environment in very
|
36 |
* much the same way that is done during a normal page request from the web
|
37 |
* server, so most Drush commands run in the context of a fully-initialized
|
38 |
* website.
|
39 |
*
|
40 |
* Configuration files are loaded in the reverse order they are shown above. All
|
41 |
* configuration files are loaded in the first bootstrapping phase, but
|
42 |
* a configuration file in a specific Drupal site folder other than the default
|
43 |
* (eg, sites/example.com/drushrc.php) will not be loaded unless a specific
|
44 |
* Drupal site is selected. However, it _will_ be loaded if a site is selected
|
45 |
* (either via the current working directory or by use of the --uri option),
|
46 |
* even if the Drush command being run does not bootstrap to the Drupal Site
|
47 |
* phase.
|
48 |
*
|
49 |
* IMPORTANT NOTE for users upgrading from Drush 4:
|
50 |
*
|
51 |
* Drush 5 no longer looks for aliases, configs or command files in the Drupal
|
52 |
* root folder, so if you previously used drushrc.php files in the Drupal root
|
53 |
* you will need to move the file to sites/all/drush/drushrc.php.
|
54 |
*
|
55 |
* The Drush commands 'rsync' and 'sql-sync' are special cases. These commands
|
56 |
* will load the configuration file for the site specified by the source
|
57 |
* parameter; however, they do not load the configuration file for the site
|
58 |
* specified by the destination parameter, nor do they load configuration files
|
59 |
* for remote sites.
|
60 |
*
|
61 |
* See `drush topic docs-bootstrap` for more information on how bootstrapping
|
62 |
* affects the loading of Drush configuration files.
|
63 |
*/
|
64 |
|
65 |
// Specify a particular multisite.
|
66 |
# $options['l'] = 'http://example.com/subir';
|
67 |
|
68 |
// Specify your Drupal core base directory (useful if you use symlinks).
|
69 |
# $options['r'] = '/home/USER/workspace/drupal-6';
|
70 |
|
71 |
/**
|
72 |
* Useful shell aliases:
|
73 |
*
|
74 |
* Drush shell aliases act similar to git aliases. For best results, define
|
75 |
* aliases in one of the drushrc file locations between #3 through #6 above.
|
76 |
* More information on shell aliases can be found via:
|
77 |
* `drush topic docs-shell-aliases` on the command line.
|
78 |
*
|
79 |
* @see https://git.wiki.kernel.org/articles/a/l/i/Aliases.html#Advanced.
|
80 |
*/
|
81 |
# $options['shell-aliases']['pull'] = '!git pull'; // We've all done it.
|
82 |
# $options['shell-aliases']['pulldb'] = '!git pull && drush updatedb';
|
83 |
# $options['shell-aliases']['noncore'] = 'pm-list --no-core';
|
84 |
# $options['shell-aliases']['wipe'] = 'cache-clear all';
|
85 |
# $options['shell-aliases']['unsuck'] = 'pm-disable -y overlay,dashboard';
|
86 |
# $options['shell-aliases']['offline'] = 'variable-set -y --always-set maintenance_mode 1';
|
87 |
# $options['shell-aliases']['online'] = 'variable-delete -y --exact maintenance_mode';
|
88 |
# $options['shell-aliases']['dis-all'] = '!drush -y dis $(drush pml --status=enabled --type=module --no-core --pipe)';
|
89 |
|
90 |
// You can create a local cache of all projects checked out using
|
91 |
// --package-handler=git_drupalorg; this can be faster for repeated
|
92 |
// downloads, but can be dangerous. See: http://randyfay.com/node/119
|
93 |
# $options['cache'] = TRUE;
|
94 |
|
95 |
/**
|
96 |
* Historical (deprecated) aliases:
|
97 |
*
|
98 |
* The following aliases were supported in Drush 4, but removed in Drush 5. To
|
99 |
* keep using them, uncomment the following lines or copy them to your drushrc
|
100 |
* file.
|
101 |
*/
|
102 |
# $options['shell-aliases']['script'] = 'php-script';
|
103 |
# $options['shell-aliases']['sync'] = 'core-rsync';
|
104 |
# $options['shell-aliases']['installsite'] = 'site-install';
|
105 |
# $options['shell-aliases']['is'] = 'site-install';
|
106 |
# $options['shell-aliases']['wd'] = 'watchdog-delete';
|
107 |
# $options['shell-aliases']['enable'] = 'pm-enable';
|
108 |
# $options['shell-aliases']['disable'] = 'pm-disable';
|
109 |
# $options['shell-aliases']['uninstall'] = 'pm-uninstall';
|
110 |
# $options['shell-aliases']['sm'] = 'pm-list';
|
111 |
# $options['shell-aliases']['refresh'] = 'pm-refresh';
|
112 |
# $options['shell-aliases']['updatecode'] = 'pm-updatecode';
|
113 |
# $options['shell-aliases']['update'] = 'pm-update';
|
114 |
# $options['shell-aliases']['download'] = 'pm-download';
|
115 |
|
116 |
// Load a drushrc.php configuration file from the current working directory.
|
117 |
# $options['config'][] = '.';
|
118 |
|
119 |
/**
|
120 |
* Drush knows how to check for and download its own code updates with the
|
121 |
* `drush pm-updatecode` and `drush version` commands. Set this value to TRUE
|
122 |
* (default) allows updates to latest stable release. Set to FALSE to disable
|
123 |
* self update checks completely. Set to 'head' to allow bleeding-edge updates
|
124 |
* from the code repository.
|
125 |
*/
|
126 |
# $options['self-update'] = FALSE;
|
127 |
|
128 |
/**
|
129 |
* Enable logging and periodic upload of anonymized usage statistics. The Drush
|
130 |
* maintainers use this data to learn which commands and options are most
|
131 |
* See the usage-show and usage-send commands.
|
132 |
*/
|
133 |
# $options['drush_usage_log'] = TRUE;
|
134 |
# $options['drush_usage_send'] = TRUE;
|
135 |
|
136 |
/**
|
137 |
* By default, Drush will download projects compatibile with the current
|
138 |
* version of Drupal, or, if no Drupal site is specified, then the Drupal-7
|
139 |
* version of the project is downloaded. Set default-major to select a
|
140 |
* different default version.
|
141 |
*/
|
142 |
# $options['default-major'] = 6;
|
143 |
|
144 |
// Clone extensions (modules, themes, etc.) from drupal.org via 'pm-download'.
|
145 |
# $options['package-handler'] = 'git_drupalorg';
|
146 |
|
147 |
/**
|
148 |
* Specify folders to search for Drush command files (*.drush.inc). These
|
149 |
* values are always merged with include paths defined on the command line or
|
150 |
* in other configuration files. On the command line, paths may be separated
|
151 |
* by a colon (:) on Unix-based systems or a semi-colon (;) on Windows.
|
152 |
*/
|
153 |
# $options['include'] = array('/path/to/commands','/path2/to/more/commands');
|
154 |
|
155 |
/**
|
156 |
* Specify the modules to ignore when searching for command files (*.drush.inc)
|
157 |
* inside a Drupal site.
|
158 |
*/
|
159 |
# $options['ignored-modules'] = array('module1', 'module2');
|
160 |
|
161 |
/**
|
162 |
* Specify the folders to search for Drush alias files (*.alias.drushrc.php and
|
163 |
* *.aliases.drushrc.php). These values are always merged with alias paths
|
164 |
* defined on the command line or in other configuration files. On the command
|
165 |
* line, paths may be separated by a colon (:) on Unix-based systems or a
|
166 |
* semi-colon (;) on Windows.
|
167 |
*/
|
168 |
# $options['alias-path'] = array('/path/to/aliases','/path2/to/more/aliases');
|
169 |
|
170 |
/**
|
171 |
* Specify the folder where 'sql-sync' should store persistent dump files.
|
172 |
* Keeping the dump files around improves the performance of rsync when the
|
173 |
* database is rsync'ed to a remote system. If a dump directory is not
|
174 |
* specified, then 'sql-sync' will store dumps in temporary files.
|
175 |
*/
|
176 |
# $options['dump-dir'] = '/path/to/dumpdir';
|
177 |
|
178 |
/**
|
179 |
* Specify the filename and path where 'sql-dump' should store backups of
|
180 |
* database dumps. The default is to dump to STDOUT, however if this option is
|
181 |
* set in a drushrc.php file, the default behaviour can be achieved by
|
182 |
* specifying a value of FALSE ("--result-file=0" on the command line). Two
|
183 |
* substitution tokens are available: @DATABASE is replaced with the name of the
|
184 |
* database being dumped, and @DATE is replaced with the current time and date
|
185 |
* of the dump of the form: YYYYMMDD_HHMMSS. A value of TRUE ("--result-file=1"
|
186 |
* on the command line) will cause 'sql-dump' to use the same temporary backup
|
187 |
* location as 'pm-updatecode'.
|
188 |
*/
|
189 |
# $options['result-file'] = TRUE;
|
190 |
# $options['result-file'] = '/path/to/backup/dir/@DATABASE_@DATE.sql';
|
191 |
|
192 |
|
193 |
// Enable verbose mode.
|
194 |
# $options['v'] = 1;
|
195 |
|
196 |
// Show database passwords in 'status' and 'sql-conf' commands.
|
197 |
# $options['show-passwords'] = 1;
|
198 |
|
199 |
/**
|
200 |
* Specify the logging level for PHP notices. Defaults to "notice". Set to
|
201 |
* "warning" when doing Drush development. Also make sure that error_reporting
|
202 |
* is set to E_ALL in your php configuration file. See `drush status` for the
|
203 |
* path to your php.ini file.
|
204 |
*/
|
205 |
# $options['php-notices'] = 'warning';
|
206 |
|
207 |
/**
|
208 |
* Specify options to pass to ssh in backend invoke. The default is to prohibit
|
209 |
* password authentication, and is included here, so you may add additional
|
210 |
* parameters without losing the default configuration.
|
211 |
*/
|
212 |
# $options['ssh-options'] = '-o PasswordAuthentication=no';
|
213 |
|
214 |
// Set 'remote-os' to 'Windows' to make Drush use Windows shell escape rules
|
215 |
// for remote sites that do not have an 'os' item set.
|
216 |
# $options['remote-os'] = 'Linux';
|
217 |
|
218 |
// By default, unknown options are disallowed and result in an error. Change
|
219 |
// them to issue only a warning and let command proceed.
|
220 |
# $options['strict'] = FALSE;
|
221 |
|
222 |
/**
|
223 |
* Drush requires at least rsync version 2.6.4 for some functions to work
|
224 |
* correctly. rsync version 2.6.8 or earlier may give the following error
|
225 |
* message: "--remove-source-files: unknown option". To fix this, set
|
226 |
* $options['rsync-version'] = '2.6.8'; (replace with the lowest version of
|
227 |
* rsync installed on any system you are using with Drush). Note that this
|
228 |
* option can also be set in a site alias, which is the prefered solution if
|
229 |
* newer versions of rsync are available on some of the systems you use.
|
230 |
* See: http://drupal.org/node/955092
|
231 |
*/
|
232 |
# $options['rsync-version'] = '2.6.9';
|
233 |
|
234 |
/**
|
235 |
* The output charset suitable to pass to the iconv PHP function's out_charset
|
236 |
* parameter.
|
237 |
*
|
238 |
* Drush will convert its output from UTF-8 to the charset specified here. It
|
239 |
* is possible to use //TRANSLIT and //IGNORE charset name suffixes (see iconv
|
240 |
* documentation). If not defined, conversion will not be performed.
|
241 |
*/
|
242 |
# $options['output_charset'] = 'ISO-8859-1';
|
243 |
# $options['output_charset'] = 'KOI8-R//IGNORE';
|
244 |
# $options['output_charset'] = 'ISO-8859-1//TRANSLIT';
|
245 |
|
246 |
/**
|
247 |
* Multiple-site execution options:
|
248 |
*
|
249 |
* Some drush commands such as 'sql-sync' are intended for or capable of being
|
250 |
* executed on multiple sites or server environments and will pass along the
|
251 |
* options specified here to all instances of the command being executed.
|
252 |
*/
|
253 |
|
254 |
/**
|
255 |
* By default, Drush will prepend the name of the site to the output of any
|
256 |
* multiple-site command execution. To disable this behavior, set the
|
257 |
* "--no-label" option.
|
258 |
*/
|
259 |
# $options['no-label'] = TRUE;
|
260 |
|
261 |
/**
|
262 |
* An explicit list of tables which should be included in sql-dump and sql-sync.
|
263 |
*/
|
264 |
# $options['tables']['common'] = array('user', 'permissions', 'role_permission', 'role');
|
265 |
|
266 |
/**
|
267 |
* List of tables whose *data* is skipped by the 'sql-dump' and 'sql-sync'
|
268 |
* commands when the "--structure-tables-key=common" option is provided.
|
269 |
* You may add specific tables to the existing array or add a new element.
|
270 |
*/
|
271 |
# $options['structure-tables']['common'] = array('cache', 'cache_filter', 'cache_menu', 'cache_page', 'history', 'sessions', 'watchdog');
|
272 |
|
273 |
/**
|
274 |
* List of tables to be omitted entirely from SQL dumps made by the 'sql-dump'
|
275 |
* and 'sql-sync' commands when the "--skip-tables-key=common" option is
|
276 |
* provided on the command line. This is useful if your database contains
|
277 |
* non-Drupal tables used by some other application or during a migration for
|
278 |
* example. You may add new tables to the existing array or add a new element.
|
279 |
*/
|
280 |
# $options['skip-tables']['common'] = array('migration_data1', 'migration_data2');
|
281 |
|
282 |
/**
|
283 |
* Override specific entries in Drupal's 'variable' table or settings.php
|
284 |
*/
|
285 |
# $options['variables']['site_name'] = 'My Drupal site';
|
286 |
# $options['variables']['theme_default'] = 'minnelli';
|
287 |
# $options['variables']['anonymous'] = 'Visitor';
|
288 |
|
289 |
/**
|
290 |
* Command-specific execution options:
|
291 |
*
|
292 |
* Most execution options can be shared between multiple Drush commands; these
|
293 |
* are specified as top-level elements of the $options array in the prior
|
294 |
* examples above. On the other hand, other options are command-specific, and,
|
295 |
* in some cases, a shared option needs a different configuration depending on
|
296 |
* which command is being executing.
|
297 |
*
|
298 |
* To define options that are only applicable to certain commands, make an entry
|
299 |
* in the $command-specific array as shown below. The name of the command may
|
300 |
* be either the command's full name or any of the command's aliases.
|
301 |
*
|
302 |
* Options defined here will be overridden by options of the same name on the
|
303 |
* command line. Unary flags such as "--verbose" are overridden via special
|
304 |
* "--no-xxx" options (e.g. "--no-verbose").
|
305 |
*
|
306 |
* Limitation: If 'verbose' is set in a command-specific option, it must be
|
307 |
* cleared by '--no-verbose', not '--no-v', and visa-versa.
|
308 |
*/
|
309 |
|
310 |
// Ensure all rsync commands use verbose output.
|
311 |
# $command_specific['rsync'] = array('verbose' => TRUE);
|
312 |
|
313 |
// CVS credentials for module dowlnoads.
|
314 |
# $command_specific['dl'] = array('cvscredentials' => 'user:pass');
|
315 |
|
316 |
// Additional folders to search for scripts.
|
317 |
// Separate by : (Unix-based systems) or ; (Windows).
|
318 |
# $command_specific['script']['script-path'] = 'sites/all/scripts:profiles/myprofile/scripts';
|
319 |
|
320 |
// Always show release notes when running pm-update or pm-updatecode.
|
321 |
# $command_specific['pm-update'] = array('notes' => TRUE);
|
322 |
# $command_specific['pm-updatecode'] = array('notes' => TRUE);
|
323 |
|
324 |
// Set a predetermined username and password when using site-install.
|
325 |
# $command_specific['site-install'] = array('account-name' => 'alice', 'account-pass' => 'secret');
|
326 |
|
327 |
/**
|
328 |
* List of Drush commands or aliases that should override built-in shell
|
329 |
* functions and commands; otherwise, built-ins override Drush commands. Default
|
330 |
* is 'help,dd,sa'. Warning: bad things can happen if you put the wrong thing
|
331 |
* here (e.g. eval, grep), so be cautious. If a Drush command overrides a
|
332 |
* built-in command (e.g. bash help), then you can use the `builtin` operator
|
333 |
* to run the built-in version (e.g. `builtin help` to show bash help instead of
|
334 |
* Drush help.) If a Drush command overrides a shell command (e.g. grep), then
|
335 |
* you can use the regular shell command by typing in the full path to the
|
336 |
* command (e.g. /bin/grep).
|
337 |
*/
|
338 |
# $command_specific['core-cli'] = array('override' => 'help,dd,sa');
|
339 |
|
340 |
/**
|
341 |
* Load a drushrc file from the 'drush' folder at the root of the current
|
342 |
* git repository. Example script below by grayside. Customize as desired.
|
343 |
* @see: http://grayside.org/node/93.
|
344 |
*/
|
345 |
#exec('git rev-parse --show-toplevel 2> /dev/null', $output);
|
346 |
#if (!empty($output)) {
|
347 |
# $repo = $output[0];
|
348 |
# $options['config'] = $repo . '/drush/drushrc.php';
|
349 |
# $options['include'] = $repo . '/drush/commands';
|
350 |
# $options['alias-path'] = $repo . '/drush/aliases';
|
351 |
#}
|