Update Robo from 0.7.2 to 1.0.5

This commit is contained in:
Alexey Stoletniy
2017-02-09 19:08:04 +03:00
parent 771ff134a8
commit 70fe253db3
3 changed files with 466 additions and 203 deletions

View File

@ -68,9 +68,9 @@ class RoboFile extends \Robo\Tasks {
}
function compileAll() {
$collection = $this->collection();
$collection->add(array($this, 'compileJs'));
$collection->add(array($this, 'compileCss'));
$collection = $this->collectionBuilder();
$collection->addCode(array($this, 'compileJs'));
$collection->addCode(array($this, 'compileCss'));
return $collection->run();
}
@ -164,9 +164,9 @@ class RoboFile extends \Robo\Tasks {
}
function qa() {
$collection = $this->collection();
$collection->add(array($this, 'qaLint'));
$collection->add(function() {
$collection = $this->collectionBuilder();
$collection->addCode(array($this, 'qaLint'));
$collection->addCode(function() {
return $this->qaCodeSniffer('all');
});
return $collection->run();
@ -219,42 +219,38 @@ class RoboFile extends \Robo\Tasks {
return;
}
$collection = $this->collection();
$collection = $this->collectionBuilder();
// Clean up tmp dirs if the previous run was halted
if(file_exists("$svn_dir/trunk_new") || file_exists("$svn_dir/trunk_old")) {
$this->taskFileSystemStack()
$collection->taskFileSystemStack()
->stopOnFail()
->remove(array("$svn_dir/trunk_new", "$svn_dir/trunk_old"))
->addToCollection($collection);
->remove(array("$svn_dir/trunk_new", "$svn_dir/trunk_old"));
}
// Extract the distributable zip to tmp trunk dir
$this->taskExtract($plugin_dist_file)
$collection->taskExtract($plugin_dist_file)
->to("$svn_dir/trunk_new")
->preserveTopDirectory(false)
->addToCollection($collection);
->preserveTopDirectory(false);
// Rename current trunk
if(file_exists("$svn_dir/trunk")) {
$this->taskFileSystemStack()
->rename("$svn_dir/trunk", "$svn_dir/trunk_old")
->addToCollection($collection);
$collection->taskFileSystemStack()
->rename("$svn_dir/trunk", "$svn_dir/trunk_old");
}
// Replace old trunk with a new one
$this->taskFileSystemStack()
$collection->taskFileSystemStack()
->stopOnFail()
->rename("$svn_dir/trunk_new", "$svn_dir/trunk")
->remove("$svn_dir/trunk_old")
->addToCollection($collection);
->remove("$svn_dir/trunk_old");
// Windows compatibility
$awkCmd = '{print " --force \""$2"\""}';
// Mac OS X compatibility
$xargsFlag = (stripos(PHP_OS, 'Darwin') !== false) ? '' : '-r';
$this->taskExecStack()
$collection->taskExecStack()
->stopOnFail()
// Set SVN repo as working directory
->dir($svn_dir)
@ -263,8 +259,7 @@ class RoboFile extends \Robo\Tasks {
// Recursively add files to SVN that haven't been added yet
->exec("svn add --force * --auto-props --parents --depth infinity -q")
// Tag the release
->exec("svn cp trunk tags/$plugin_version")
->addToCollection($collection);
->exec("svn cp trunk tags/$plugin_version");
$result = $collection->run();

View File

@ -20,7 +20,8 @@
"require-dev": {
"codeception/codeception": "*",
"codeception/verify": "*",
"codegyre/robo": "*",
"consolidation/robo": "*",
"henrikbjorn/lurker": "^1.2",
"vlucas/phpdotenv": "*",
"umpirsky/twig-gettext-extractor": "1.1.*",
"raveren/kint": "^1.0",

627
composer.lock generated

File diff suppressed because it is too large Load Diff