-
Notifications
You must be signed in to change notification settings - Fork 3
/
RoboFile.php
90 lines (79 loc) · 1.79 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
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
85
86
87
88
89
90
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* Download robo.phar from http://robo.li/robo.phar and type in the root of the repo: $ php robo.phar
* Or do: $ composer update, and afterwards you will be able to execute robo like $ php vendor/bin/robo
*
* @see http://robo.li/
*/
use Joomla\Jorobo\Tasks\loadTasks;
if (!defined('JPATH_BASE'))
{
define('JPATH_BASE', __DIR__);
}
// PSR-4 Autoload by composer
require_once JPATH_BASE . '/vendor/autoload.php';
class RoboFile extends \Robo\Tasks
{
use loadTasks;
/**
* Initialize Robo
*/
public function __construct()
{
$this->stopOnFail(false);
}
/**
* Build the joomla extension package
*
* @param array $params Additional params
*
* @return void
*/
public function build($params = ['dev' => false])
{
if (!file_exists('jorobo.ini'))
{
$this->_copy('jorobo.dist.ini', 'jorobo.ini');
}
//$this->taskBuild($params)->run();
(new \Joomla\Jorobo\Tasks\Build($params))->run();
}
/**
* Update copyright headers for this project. (Set the text up in the jorobo.ini)
*
* @return void
*/
public function headers()
{
(new \Joomla\Jorobo\Tasks\CopyrightHeader())->run();
}
/**
* Symlink projectfiles from source into target
*
* @param string $target Absolute path to Joomla! root
*
* @return void
*/
public function map($target)
{
//$this->taskMap($target)->run();
(new \Joomla\Jorobo\Tasks\Map($target))->run();
}
/**
* Bump Version placeholder __DEPLOY_VERSION__ in this project. (Set the version up in the jorobo.ini)
*
* @return void
*
* @since 1.0.0
*/
public function bump()
{
if (!file_exists('jorobo.ini'))
{
$this->_copy('jorobo.dist.ini', 'jorobo.ini');
}
(new \Joomla\Jorobo\Tasks\BumpVersion())->run();
}
}