Repository navigation
Expand file tree
/
Copy pathRoboFile.php
More file actions
132 lines (116 loc) · 3.16 KB
/
Copy pathRoboFile.php
File metadata and controls
132 lines (116 loc) · 3.16 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?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
*
* @package Joomla.Site
* @subpackage RoboFile
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
use Joomla\Jorobo\Tasks\Tasks as loadReleaseTasks;
use Robo\Tasks;
require_once 'vendor/autoload.php';
if (!defined('JPATH_BASE')) {
define('JPATH_BASE', __DIR__);
}
/**
* Modern php task runner for Joomla! Browser Automated Tests execution
*
* @package RoboFile
*
* @since 1.0
*/
class RoboFile extends Tasks
{
// Load tasks from composer, see composer.json
use loadReleaseTasks;
/**
* Constructor
*/
public function __construct()
{
// Set default timezone (so no warnings are generated if it is not set)
date_default_timezone_set('UTC');
}
/**
* Build the joomla extension package
*
* @param array $params Additional params
*
* @return void
* @since __DEPLOY_VERSION__
*/
public function build($params = ['dev' => false])
{
if (!file_exists('jorobo.ini')) {
$this->_copy('jorobo.dist.ini', 'jorobo.ini');
}
$this->task(\Joomla\Jorobo\Tasks\Build::class, $params)->run();
}
/**
* Update copyright headers for this project. (Set the text up in the jorobo.ini)
*
* @return void
* @since __DEPLOY_VERSION__
*/
public function headers()
{
if (!file_exists('jorobo.ini')) {
$this->_copy('jorobo.dist.ini', 'jorobo.ini');
}
$this->task(\Joomla\Jorobo\Tasks\CopyrightHeader::class)->run();
}
/**
* Update Version __DEPLOY_VERSION__ in Component. (Set the version up in the jorobo.ini)
*
* @return void
* @since __DEPLOY_VERSION__
*/
public function bump()
{
$this->task(\Joomla\Jorobo\Tasks\BumpVersion::class)->run();
}
/**
* Map into Joomla installation.
*
* @param String $target The target joomla instance
*
* @return void
* @since __DEPLOY_VERSION__
*
*/
public function map($target)
{
$this->task(\Joomla\Jorobo\Tasks\Map::class, $target)->run();
}
/**
* Generate joomla.asset.json files
*
* @return void
* @since __DEPLOY_VERSION__
*/
public function assetJSON()
{
if (!file_exists('jorobo.ini')) {
$this->_copy('jorobo.dist.ini', 'jorobo.ini');
}
$this->task(\Joomla\Jorobo\Tasks\AssetJSON::class)->run();
}
/**
* Generate/extend changelog.xml
*
* @return void
* @since __DEPLOY_VERSION__
*/
public function changelog()
{
if (!file_exists('jorobo.ini')) {
$this->_copy('jorobo.dist.ini', 'jorobo.ini');
}
$this->task(\Joomla\Jorobo\Tasks\Changelog::class)->run();
}
}