mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-09-08 14:28:57 +02:00
[Nostromo] Fixes and Tests
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
namespace Mage\Task\BuiltIn\Deploy;
|
||||
|
||||
use Mage\Task\ErrorException;
|
||||
use Symfony\Component\Process\Process;
|
||||
use Mage\Task\AbstractTask;
|
||||
|
||||
@@ -38,7 +39,7 @@ class RsyncTask extends AbstractTask
|
||||
$targetDir = rtrim($hostPath, '/');
|
||||
|
||||
if ($this->runtime->getEnvironmentConfig('releases', false)) {
|
||||
$targetDir = sprintf('%s/releases/%s', $hostPath, $this->runtime->getReleaseId());
|
||||
throw new ErrorException('Can\'t be used with Releases, use "deploy/targz/copy"');
|
||||
}
|
||||
|
||||
$excludes = $this->getExcludes();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
namespace Mage\Task\BuiltIn\Deploy\TarGz;
|
||||
|
||||
use Mage\Runtime\Exception\DeploymentException;
|
||||
use Mage\Task\ErrorException;
|
||||
use Symfony\Component\Process\Process;
|
||||
use Mage\Task\AbstractTask;
|
||||
|
||||
@@ -34,7 +34,7 @@ class CleanupTask extends AbstractTask
|
||||
public function execute()
|
||||
{
|
||||
if (!$this->runtime->getEnvironmentConfig('releases', false)) {
|
||||
throw new DeploymentException('This task is only available with releases enabled', 400);
|
||||
throw new ErrorException('This task is only available with releases enabled', 400);
|
||||
}
|
||||
|
||||
$tarGzLocal = $this->runtime->getVar('targz_local');
|
||||
|
||||
Reference in New Issue
Block a user