Major overhauling and refactoring of Magallanes Command and Tasks modulairty and workflow.

ADVICE: there is no Backwards Compatibility with custom tasks, those
using the _config instance will be broken or those using the
getEnvironmentName().
This commit is contained in:
Andrés Montañez
2012-09-21 00:23:07 -03:00
parent 05b102b273
commit 811c83e13a
29 changed files with 803 additions and 639 deletions
+6 -6
View File
@@ -4,15 +4,15 @@ class Mage_Task_BuiltIn_Scm_Clone
{
private $_name = 'SCM Clone [built-in]';
private $_source = null;
public function getName()
{
return $this->_name;
}
public function init()
{
$this->_source = $this->_config->deployment('source');
$this->_source = $this->getConfig()->deployment('source');
switch ($this->_source['type']) {
case 'git':
$this->_name = 'SCM Clone (GIT) [built-in]';
@@ -23,7 +23,7 @@ class Mage_Task_BuiltIn_Scm_Clone
break;
}
}
public function run()
{
$this->_runLocalCommand('mkdir -p ' . $this->_source['temporal']);
@@ -39,14 +39,14 @@ class Mage_Task_BuiltIn_Scm_Clone
. 'git checkout ' . $this->_source['from'];
$result = $result && $this->_runLocalCommand($command);
$this->_config->setFrom($this->_source['temporal']);
$this->getConfig()->setFrom($this->_source['temporal']);
break;
case 'svn':
return false;
break;
}
return $result;
}
}