diff --git a/src/Task/BuiltIn/Deploy/RsyncTask.php b/src/Task/BuiltIn/Deploy/RsyncTask.php index b34df20..70a58a7 100644 --- a/src/Task/BuiltIn/Deploy/RsyncTask.php +++ b/src/Task/BuiltIn/Deploy/RsyncTask.php @@ -33,7 +33,7 @@ class RsyncTask extends AbstractTask public function execute() { - $flags = $this->runtime->getConfigOption('rsync', '-avz'); + $flags = $this->runtime->getEnvOption('rsync', '-avz'); $sshConfig = $this->runtime->getSSHConfig(); $user = $this->runtime->getEnvOption('user', $this->runtime->getCurrentUser()); $host = $this->runtime->getWorkingHost(); diff --git a/src/Task/BuiltIn/Deploy/TarGz/CopyTask.php b/src/Task/BuiltIn/Deploy/TarGz/CopyTask.php index f24a172..fa62086 100644 --- a/src/Task/BuiltIn/Deploy/TarGz/CopyTask.php +++ b/src/Task/BuiltIn/Deploy/TarGz/CopyTask.php @@ -43,6 +43,7 @@ class CopyTask extends AbstractTask $hostPath = rtrim($this->runtime->getEnvOption('host_path'), '/'); $currentReleaseId = $this->runtime->getReleaseId(); + $flags = $this->runtime->getEnvOption('tar_extract', 'xfzop'); $targetDir = sprintf('%s/releases/%s', $hostPath, $currentReleaseId); $tarGzLocal = $this->runtime->getVar('targz_local'); @@ -53,7 +54,7 @@ class CopyTask extends AbstractTask /** @var Process $process */ $process = $this->runtime->runLocalCommand($cmdCopy, 300); if ($process->isSuccessful()) { - $cmdUnTar = sprintf('cd %s && tar xfzop %s', $targetDir, $tarGzRemote); + $cmdUnTar = sprintf('cd %s && tar %s %s', $targetDir, $flags, $tarGzRemote); $process = $this->runtime->runRemoteCommand($cmdUnTar, false, 600); if ($process->isSuccessful()) { $cmdDelete = sprintf('rm %s/%s', $targetDir, $tarGzRemote); diff --git a/src/Task/BuiltIn/Deploy/TarGz/PrepareTask.php b/src/Task/BuiltIn/Deploy/TarGz/PrepareTask.php index b364cfc..f4d1cdf 100644 --- a/src/Task/BuiltIn/Deploy/TarGz/PrepareTask.php +++ b/src/Task/BuiltIn/Deploy/TarGz/PrepareTask.php @@ -41,7 +41,8 @@ class PrepareTask extends AbstractTask $this->runtime->setVar('targz_local', $tarGzLocal); $excludes = $this->getExcludes(); - $cmdTarGz = sprintf('tar cfzop %s %s ./', $tarGzLocal, $excludes); + $flags = $this->runtime->getEnvOption('tar_create', 'cfzop'); + $cmdTarGz = sprintf('tar %s %s %s ./', $flags, $tarGzLocal, $excludes); /** @var Process $process */ $process = $this->runtime->runLocalCommand($cmdTarGz, 300);