forked from codeceptjs/CodeceptJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RoboFile.php
56 lines (52 loc) · 1.29 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
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/
class RoboFile extends \Robo\Tasks
{
function docs()
{
$this->taskGulpRun('docs')
->run();
$this->taskGitStack()
->add('docs')
->commit('updated docs')
->run();
}
function publishSite()
{
$this->taskGitStack()
->checkout('site')
->merge('master')
->run();
$this->stopOnFail();
$this->_copy('CHANGELOG.md', 'docs/changelog.md');
$this->_exec('mkdocs gh-deploy');
$this->_remove('docs/changelog.md');
$this->taskGitStack()
->checkout('master')
->run();
}
function testServer()
{
$this->taskServer(8000)
->dir('test/data/app')
->run();
}
function release()
{
$package = json_decode(file_get_contents('package.json'), true);
$version = $package['version'];
$this->docs();
$this->stopOnFail();
$this->publishSite();
$this->taskGitStack()
->tag($version)
->push('origin master --tags')
->run();
$this->_exec('npm publish');
$this->yell('It is released!');
}
}