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
+8 -11
View File
@@ -1,22 +1,19 @@
<?php
class Mage_Task_Update
class Mage_Command_BuiltIn_Update
extends Mage_Command_CommandAbstract
{
private $_config = null;
public function run(Mage_Config $config)
public function run()
{
$this->_config = $config;
$task = Mage_Task_Factory::get('scm/update', $config);
$task = Mage_Task_Factory::get('scm/update', $this->getConfig());
$task->init();
Mage_Console::output('Updating application via ' . $task->getName() . ' ... ', 1, 0);
$result = $task->run();
if ($result == true) {
Mage_Console::output('OK' . PHP_EOL, 0);
Mage_Console::output('<green>OK</green>' . PHP_EOL, 0);
} else {
Mage_Console::output('FAIL' . PHP_EOL, 0);
Mage_Console::output('<red>FAIL</red>' . PHP_EOL, 0);
}
}