-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbaseline.drush.inc
More file actions
43 lines (39 loc) · 929 Bytes
/
Copy pathbaseline.drush.inc
File metadata and controls
43 lines (39 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* @file
* baseline commands for Drush
*/
/**
* Implements hook_drush_command().
*/
function baseline_drush_command() {
$items = array();
$items['baseline'] = array(
'description' => "Invokes hooks that get all the baseline info and then builds a baseline based on that info. to another.",
'examples' => array(
'drush baseline' => 'build baseline',
),
'aliases' => array('bbs'),
'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
);
return $items;
}
/**
* Implementation of hook_drush_help().
*/
function baseline_drush_help($section) {
switch ($section) {
case 'drush:baseline':
return dt("Build the baseline.");
}
}
/**
* Actual function run by the baseline command.
*/
function drush_baseline() {
if (drush_confirm(dt('Do you want to build the baseline'))) {
module_load_include('module', 'baseline');
baseline_build();
drush_print(dt('Success.'));
}
}