-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRoboFile.php
More file actions
84 lines (75 loc) · 1.71 KB
/
RoboFile.php
File metadata and controls
84 lines (75 loc) · 1.71 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/
use NGF\Robo\Tasks as NGFTasks;
/**
* Class RoboFile.
*/
class RoboFile extends NGFTasks {
/**
* Build project.
*
* @command project:build
* @aliases pb
*/
public function build($branch) {
// Generate environment file.
$this->projectGenerateEnv();
// Load .env file from project root.
$dotenv = new Dotenv\Dotenv($this->root() . "/../");
$dotenv->load();
var_dump(getenv("ENVIRONMENT"));
if (getenv("ENVIRONMENT") == 'development') {
$this->projectSetupBehat();
}
// Change Branch.
$this
->taskGitStack()
->stopOnFail()
->checkout($branch)
->pull()
->run();
$this->say(getcwd());
// Install website.
/*
$this->getInstallConfigTask()
->arg('config_installer_sync_configure_form.sync_directory=' . $this->config('settings.config_directories.sync'))
->siteInstall('config_installer')
->run();
$this->taskDrushStack($this->config('bin.drush'))
->arg('-r', 'web/')
->exec("php-eval 'node_access_rebuild();'")
->run();
*/
}
/**
* Update project dependencies.
*
* @command project:update-dep
* @aliases pud
*/
public function updateSiteDependencies() {
// Run Composer update.
$this
->taskComposerUpdate()
->run();
}
/**
* Update project.
*
* @command project:update
* @aliases pu
*/
public function updateSite() {
$this->taskDrushStack($this->config('bin.drush'))
->arg('-r', 'web/')
->exec('cache-clear drush')
->exec('updb')
->exec('csim -y')
->exec('cr')
->run();
}
}