-
Notifications
You must be signed in to change notification settings - Fork 5
/
RoboFile.php
45 lines (39 loc) · 1.45 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
<?php
if (file_exists($composer = __DIR__.'/vendor/autoload.php')) {
require_once $composer;
}
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
class RoboFile extends \Robo\Tasks
{
use \Generoi\Robo\Command\loadCommands;
// phpcs:enable
use \Generoi\Robo\Task\loadTasks;
/**
* Pull uploads directory from remote to local.
*
* @param string $source Source alias eg. `production`
* @return \Robo\Result
*/
public function filesPull(string $source, $options = ['exclude' => null, 'dry-run' => false, 'options' => null])
{
return $this->rsyncPull("{$source}:%files", $options);
}
/**
* Push uploads directory from local to remote.
*
* @param string $destination Destination alias eg. `production`
* @return \Robo\Result
*/
public function filesPush(string $destination, $options = ['exclude' => null, 'dry-run' => true, 'options' => null])
{
return $this->rsyncPush("{$destination}:%files", $options);
}
// You can override common tasks by overloading their functions in this file. Eg.
//
// public function buildDevelopment($options = ['npm-script' => 'build'])
// public function buildProduction($options = ['npm-script' => 'build:production'])
// public function installDevelopment()
// public function installProduction()
// public function deployProduction()
// public function deployStaging()
}