-
Notifications
You must be signed in to change notification settings - Fork 0
/
RoboFile.php
59 lines (52 loc) · 1.62 KB
/
RoboFile.php
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/
use Robo\Tasks;
/**
* Robo Tasks.
*/
class RoboFile extends Tasks {
/**
* Local Site update.
*/
public function localUpdate() {
$this->say("DC ATL Local site update started");
$collection = $this->collectionBuilder();
$collection->taskExec('drush state:set system.maintenance_mode 1 -y')
->taskExec('drush cr -y')
->taskExec('drush updatedb -y')
->taskExec('drush cim -y')
->taskExec('drush cim -y')
->taskExec('drush cr -y')
->taskExec('drush php-eval "node_access_rebuild();" -y')
->taskExec('drush state:set system.maintenance_mode 0 -y')
->addCode([$this, 'themeUpdate']);
return $collection;
}
/**
* Local Site install.
*/
public function localInstall() {
$this->say("DC ATL Local site installation started");
$collection = $this->collectionBuilder();
$collection->taskExec('drush si --account-name=admin --account-pass=admin --existing-config -y')
->taskExec('drush cim -y')
->taskExec('drush cim -y')
->taskExec('drush cr -y')
->taskExec('drush php-eval "node_access_rebuild();" -y')
->addCode([$this, 'themeUpdate']);
return $collection;
}
/**
* Theme update.
*/
public function themeUpdate() {
$this->taskNpmInstall()->dir('/app/webroot/themes/custom/dgc')->run();
$this->taskGulpRun('sass')->dir('/app/webroot/themes/custom/dgc')->run();
$this->taskGulpRun('javascript')->dir('/app/webroot/themes/custom/dgc')->run();
$this->taskExec('drush cc css-js')->run();
}
}