mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-14 03:25:07 +02:00
Issue #70, makes --release mandatory.
This commit is contained in:
parent
17ebb5b30d
commit
92d3845052
|
@ -28,6 +28,11 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment
|
|||
*/
|
||||
public function run()
|
||||
{
|
||||
if (!is_numeric($this->getConfig()->getParameter('release', ''))) {
|
||||
Console::output('<red>This release is mandatory.</red>', 1, 2);
|
||||
return false;
|
||||
}
|
||||
|
||||
$subcommand = $this->getConfig()->getArgument(1);
|
||||
$lockFile = '.mage/' . $this->getConfig()->getEnvironment() . '.lock';
|
||||
if (file_exists($lockFile) && ($subcommand == 'rollback')) {
|
||||
|
|
|
@ -29,6 +29,11 @@ class RollbackCommand extends AbstractCommand implements RequiresEnvironment
|
|||
public function run()
|
||||
{
|
||||
$releaseId = $this->getConfig()->getArgument(1);
|
||||
if (!is_numeric($releaseId)) {
|
||||
Console::output('<red>This release is mandatory.</red>', 1, 2);
|
||||
return false;
|
||||
}
|
||||
|
||||
$lockFile = '.mage/' . $this->getConfig()->getEnvironment() . '.lock';
|
||||
if (file_exists($lockFile) && ($subcommand == 'rollback')) {
|
||||
Console::output('<red>This environment is locked!</red>', 1, 2);
|
||||
|
|
Loading…
Reference in a new issue