|
|
|
@ -32,7 +32,7 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment
|
|
|
|
|
$lockFile = '.mage/' . $this->getConfig()->getEnvironment() . '.lock'; |
|
|
|
|
if (file_exists($lockFile) && ($subcommand == 'rollback')) { |
|
|
|
|
Console::output('<red>This environment is locked!</red>', 1, 2); |
|
|
|
|
return; |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Run Tasks for Deployment |
|
|
|
@ -47,17 +47,17 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment
|
|
|
|
|
|
|
|
|
|
switch ($subcommand) { |
|
|
|
|
case 'list': |
|
|
|
|
$task = Factory::get('releases/list', $this->getConfig()); |
|
|
|
|
$task->init(); |
|
|
|
|
$task = Factory::get('releases/list', $this->getConfig()); |
|
|
|
|
$task->init(); |
|
|
|
|
$result = $task->run(); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case 'rollback': |
|
|
|
|
$releaseId = $this->getConfig()->getParameter('release', ''); |
|
|
|
|
$task = Factory::get('releases/rollback', $this->getConfig()); |
|
|
|
|
$releaseId = $this->getConfig()->getParameter('release', ''); |
|
|
|
|
$task = Factory::get('releases/rollback', $this->getConfig()); |
|
|
|
|
$task->init(); |
|
|
|
|
$task->setRelease($releaseId); |
|
|
|
|
$result = $task->run(); |
|
|
|
|
$task->setRelease($releaseId); |
|
|
|
|
$result = $task->run(); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|