|
|
|
@ -125,7 +125,7 @@ class Mage_Console
|
|
|
|
|
// Load Config |
|
|
|
|
$config = new Mage_Config; |
|
|
|
|
$config->loadGeneral(); |
|
|
|
|
$config->loadEnvironment($this->getEnvironment()); |
|
|
|
|
$environmentOk = $config->loadEnvironment($this->getEnvironment()); |
|
|
|
|
$config->loadSCM(); |
|
|
|
|
|
|
|
|
|
// Logging |
|
|
|
@ -142,6 +142,10 @@ class Mage_Console
|
|
|
|
|
Mage_Console::output('Starting <blue>Magallanes</blue>', 0, 2); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!$environmentOk) { |
|
|
|
|
Mage_Console::output('<red>You have selected an invalid environment</red>', 0, 2); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
switch ($this->getAction()) { |
|
|
|
|
case 'deploy': |
|
|
|
|
$task = new Mage_Task_Deploy; |
|
|
|
@ -150,12 +154,21 @@ class Mage_Console
|
|
|
|
|
|
|
|
|
|
case 'releases': |
|
|
|
|
$task = new Mage_Task_Releases; |
|
|
|
|
if (!isset($this->_args[1])) { |
|
|
|
|
Mage_Console::output('<red>You must indicate a task</red>', 0, 2); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
switch ($this->_args[1]) { |
|
|
|
|
case 'list': |
|
|
|
|
$task->setAction($this->_args[1]); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case 'rollback': |
|
|
|
|
if (!isset($this->_args[2])) { |
|
|
|
|
Mage_Console::output('<red>You must indicate a release point</red>', 0, 2); |
|
|
|
|
break 2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$task->setAction($this->_args[1]); |
|
|
|
|
$task->setRelease($this->_args[2]); |
|
|
|
|
break; |
|
|
|
@ -211,6 +224,7 @@ class Mage_Console
|
|
|
|
|
Mage_Console::output('<red>Invalid action</red>', 0, 2); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($showGrettings) { |
|
|
|
|
Mage_Console::output('Finished <blue>Magallanes</blue>', 0, 2); |
|
|
|
|