mirror of
https://github.com/hauke68/Magallanes.git
synced 2025-08-26 13:20:17 +02:00
Related to #130
This commit is contained in:
parent
8771cf2ab1
commit
40e8c33846
@ -28,7 +28,7 @@ class CompileCommand extends AbstractCommand
|
||||
{
|
||||
if (ini_get('phar.readonly')) {
|
||||
Console::output('The <purple>php.ini</purple> variable <light_red>phar.readonly</light_red> must be <yellow>Off</yellow>.', 1, 2);
|
||||
return 300;
|
||||
return 200;
|
||||
}
|
||||
|
||||
$compiler = new Compiler;
|
||||
|
@ -111,20 +111,20 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$exitCode = 1000;
|
||||
$exitCode = 240;
|
||||
|
||||
// Check if Environment is not Locked
|
||||
$lockFile = getcwd() . '/.mage/' . $this->getConfig()->getEnvironment() . '.lock';
|
||||
if (file_exists($lockFile)) {
|
||||
Console::output('<red>This environment is locked!</red>', 1, 2);
|
||||
echo file_get_contents($lockFile);
|
||||
return 1010;
|
||||
return 231;
|
||||
}
|
||||
|
||||
// Check for running instance and Lock
|
||||
if (file_exists(getcwd() . '/.mage/~working.lock')) {
|
||||
Console::output('<red>There is already an instance of Magallanes running!</red>', 1, 2);
|
||||
return 1020;
|
||||
return 230;
|
||||
} else {
|
||||
touch(getcwd() . '/.mage/~working.lock');
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class ListCommand extends AbstractCommand
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$exitCode = 600;
|
||||
$exitCode = 221;
|
||||
$subCommand = $this->getConfig()->getArgument(1);
|
||||
|
||||
try {
|
||||
@ -56,7 +56,7 @@ class ListCommand extends AbstractCommand
|
||||
*/
|
||||
protected function listEnvironments()
|
||||
{
|
||||
$exitCode = 600;
|
||||
$exitCode = 220;
|
||||
$environments = array();
|
||||
$content = scandir(getcwd() . '/.mage/config/environment/');
|
||||
foreach ($content as $file) {
|
||||
|
@ -28,7 +28,7 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$exitCode = 400;
|
||||
$exitCode = 100;
|
||||
$subCommand = $this->getConfig()->getArgument(1);
|
||||
|
||||
// Run Tasks for Deployment
|
||||
@ -40,7 +40,7 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment
|
||||
1, 3
|
||||
);
|
||||
|
||||
return 401;
|
||||
return 101;
|
||||
}
|
||||
|
||||
$result = true;
|
||||
@ -67,7 +67,7 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment
|
||||
if (!is_numeric($this->getConfig()->getParameter('release', ''))) {
|
||||
Console::output('<red>Missing required releaseid.</red>', 1, 2);
|
||||
|
||||
return 410;
|
||||
return 102;
|
||||
}
|
||||
|
||||
$lockFile = getcwd() . '/.mage/' . $this->getConfig()->getEnvironment() . '.lock';
|
||||
@ -75,7 +75,7 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment
|
||||
Console::output('<red>This environment is locked!</red>', 1, 2);
|
||||
echo file_get_contents($lockFile);
|
||||
|
||||
return 420;
|
||||
return 103;
|
||||
}
|
||||
|
||||
$releaseId = $this->getConfig()->getParameter('release', '');
|
||||
|
@ -28,19 +28,19 @@ class RollbackCommand extends AbstractCommand implements RequiresEnvironment
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$exitCode = 450;
|
||||
$exitCode = 105;
|
||||
$releaseId = $this->getConfig()->getArgument(1);
|
||||
|
||||
if (!is_numeric($releaseId)) {
|
||||
Console::output('<red>This release is mandatory.</red>', 1, 2);
|
||||
return 451;
|
||||
return 104;
|
||||
}
|
||||
|
||||
$lockFile = getcwd() . '/.mage/' . $this->getConfig()->getEnvironment() . '.lock';
|
||||
if (file_exists($lockFile)) {
|
||||
Console::output('<red>This environment is locked!</red>', 1, 2);
|
||||
echo file_get_contents($lockFile);
|
||||
return 20;
|
||||
return 106;
|
||||
}
|
||||
|
||||
// Run Tasks for Deployment
|
||||
|
@ -38,7 +38,7 @@ class UpgradeCommand extends AbstractCommand
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$exitCode = 100;
|
||||
$exitCode = 99;
|
||||
Console::output('Upgrading <dark_gray>Magallanes</dark_gray> ... ', 1, 0);
|
||||
|
||||
$user = '';
|
||||
|
Loading…
Reference in New Issue
Block a user