1
0
mirror of https://github.com/hauke68/Magallanes.git synced 2025-08-26 13:20:17 +02:00
This commit is contained in:
Andrés Montañez 2014-08-06 14:35:50 -03:00
parent ec2bb12bf4
commit 724fc05b9e
7 changed files with 10 additions and 6 deletions

View File

@ -350,6 +350,7 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
if (self::$deployStatus == self::SUCCEDED && $this->getConfig()->release('enabled', false) == true) {
// Execute the Releases
Console::output('Starting the <dark_gray>Releasing</dark_gray>');
$completedTasks = 0;
foreach ($hosts as $hostKey => $host) {
// Check if Host has specific configuration

View File

@ -28,6 +28,7 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment
*/
public function run()
{
$result = false;
$subCommand = $this->getConfig()->getArgument(1);
// Run Tasks for Deployment

View File

@ -28,14 +28,16 @@ class RollbackCommand extends AbstractCommand implements RequiresEnvironment
*/
public function run()
{
$result = false;
$releaseId = $this->getConfig()->getArgument(1);
if (!is_numeric($releaseId)) {
Console::output('<red>This release is mandatory.</red>', 1, 2);
return false;
}
$lockFile = getcwd() . '/.mage/' . $this->getConfig()->getEnvironment() . '.lock';
if (file_exists($lockFile) && ($subcommand == 'rollback')) {
if (file_exists($lockFile)) {
Console::output('<red>This environment is locked!</red>', 1, 2);
echo file_get_contents($lockFile);
return null;

View File

@ -85,11 +85,10 @@ class Console
}
});
// Load configuration
$config = self::$config = new Config;
$configError = false;
try {
// Load Config
$config = self::$config = new Config;
// Load configuration
$config->load($arguments);
} catch (Exception $exception) {
@ -249,7 +248,6 @@ class Console
public static function readInput()
{
$fp = fopen("php://stdin", "r");
$line = '';
$line = fgets($fp);
return rtrim($line);

View File

@ -36,6 +36,7 @@ class ReleaseTask extends AbstractTask implements IsReleaseAware, SkipOnOverride
*/
public function run()
{
$resultFetch = false;
if ($this->getConfig()->release('enabled', false) == true) {
$releasesDirectory = $this->getConfig()->release('directory', 'releases');
$symlink = $this->getConfig()->release('symlink', 'current');

View File

@ -95,7 +95,7 @@ abstract class BaseStrategyTaskAbstract extends AbstractTask implements IsReleas
$directoryToDelete = $releasesDirectory . '/' . $releaseIdToDelete;
if ($directoryToDelete != '/') {
$command = 'rm -rf ' . $directoryToDelete;
$result = $result && $this->runCommandRemote($command);
$this->runCommandRemote($command);
}
}
}

View File

@ -480,6 +480,7 @@ class Parser
if ($isCurrentLineBlank) {
$text .= substr($this->currentLine, $indentation);
} else {
/** @noinspection PhpUndefinedVariableInspection */
$text .= $matches[1];
}