make h option for targz optional, default is set h option

This commit is contained in:
Alexander Miehe 2015-01-12 19:50:19 +01:00
parent f4c3817b37
commit 4cdb95f3be

View file

@ -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