From 4cdb95f3beb1aaaa11010b01a92cd5a33d4c0f9d Mon Sep 17 00:00:00 2001 From: Alexander Miehe Date: Mon, 12 Jan 2015 19:50:19 +0100 Subject: [PATCH] make h option for targz optional, default is set h option --- Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php b/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php index 9bb1b25..625bd7b 100644 --- a/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php +++ b/Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php @@ -77,7 +77,10 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware $strategyFlags = ''; } - $command = 'tar cfzh' . $strategyFlags . ' ' . $localTarGz . '.tar.gz ' . $excludeCmd . $excludeFromFileCmd . ' -C ' . $this->getConfig()->deployment('from') . ' .'; + // remove h option only if dump_symlinks is allowed in the release config part + $dumpSymlinks = $this->getConfig()->release('dump_symlinks') ? '' : 'h'; + + $command = 'tar cfz'. $dumpSymlinks . $strategyFlags . ' ' . $localTarGz . '.tar.gz ' . $excludeCmd . $excludeFromFileCmd . ' -C ' . $this->getConfig()->deployment('from') . ' .'; $result = $this->runCommandLocal($command); // Strategy Flags