mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-29 10:38:57 +02:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user