mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-01 21:32:16 +02:00
Update TarGzTask.php
Simpler $sudo cheking conditionals.
This commit is contained in:
parent
1037cabaef
commit
281b1a4d54
|
@ -103,7 +103,7 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware
|
||||||
|
|
||||||
$uploadDirectory = $deployToDirectory;
|
$uploadDirectory = $deployToDirectory;
|
||||||
|
|
||||||
if ($sudo === true) {
|
if ($sudo) {
|
||||||
$uploadDirectory = "/tmp";
|
$uploadDirectory = "/tmp";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware
|
||||||
. $uploadDirectory;
|
. $uploadDirectory;
|
||||||
$result = $this->runCommandLocal($command) && $result;
|
$result = $this->runCommandLocal($command) && $result;
|
||||||
|
|
||||||
if ($sudo === true) {
|
if ($sudo) {
|
||||||
$tarGzFileName = $remoteTarGz . '.tar.gz';
|
$tarGzFileName = $remoteTarGz . '.tar.gz';
|
||||||
$command = $this->getReleasesAwareCommand('mv /tmp/' . $tarGzFileName . ' ' . $deployToDirectory);
|
$command = $this->getReleasesAwareCommand('mv /tmp/' . $tarGzFileName . ' ' . $deployToDirectory);
|
||||||
$result = $this->runCommandRemote($command) && $result;
|
$result = $this->runCommandRemote($command) && $result;
|
||||||
|
|
Loading…
Reference in a new issue