From 899809dc33654e3e4750c3c17b36b45f02c49dbb Mon Sep 17 00:00:00 2001 From: Bastian Guse Date: Mon, 25 Nov 2013 10:51:38 +0100 Subject: [PATCH] added missing exclude Files to TarGzTask --- Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php b/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php index e203d60..cb3259d 100644 --- a/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php +++ b/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php @@ -81,10 +81,14 @@ class TarGzTask extends AbstractTask implements IsReleaseAware // Create Tar Gz $localTarGz = tempnam(sys_get_temp_dir(), 'mage'); $remoteTarGz = basename($localTarGz); - $command = 'tar cfz ' . $localTarGz . '.tar.gz ' . $this->getConfig()->deployment('from'); - $result = $this->runCommandLocal($command); + $excludes = array_merge($excludes, $userExcludes); + $excludeCmd = ''; + foreach ($excludes as $excludeFile) { + $excludeCmd .= ' --exclude=' . $excludeFile; + } - //. $this->excludes(array_merge($excludes, $userExcludes)) . ' ' + $command = 'tar cfz ' . $localTarGz . '.tar.gz ' . $excludeCmd . ' ' . $this->getConfig()->deployment('from'); + $result = $this->runCommandLocal($command); // Copy Tar Gz to Remote Host $command = 'scp -P ' . $this->getConfig()->getHostPort() . ' ' . $localTarGz . '.tar.gz '