mirror of
https://github.com/hauke68/Magallanes.git
synced 2025-08-26 13:20:17 +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()
|
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);
|
$subcommand = $this->getConfig()->getArgument(1);
|
||||||
$lockFile = '.mage/' . $this->getConfig()->getEnvironment() . '.lock';
|
$lockFile = '.mage/' . $this->getConfig()->getEnvironment() . '.lock';
|
||||||
if (file_exists($lockFile) && ($subcommand == 'rollback')) {
|
if (file_exists($lockFile) && ($subcommand == 'rollback')) {
|
||||||
|
@ -29,6 +29,11 @@ class RollbackCommand extends AbstractCommand implements RequiresEnvironment
|
|||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
$releaseId = $this->getConfig()->getArgument(1);
|
$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';
|
$lockFile = '.mage/' . $this->getConfig()->getEnvironment() . '.lock';
|
||||||
if (file_exists($lockFile) && ($subcommand == 'rollback')) {
|
if (file_exists($lockFile) && ($subcommand == 'rollback')) {
|
||||||
Console::output('<red>This environment is locked!</red>', 1, 2);
|
Console::output('<red>This environment is locked!</red>', 1, 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user