Browse Source

Merge pull request #279 from marmotz/EscapeTarGzExcludes

Escape targz excludes to allow wildcard
1.0
Andrés Montañez 8 years ago committed by GitHub
parent
commit
a1e5677192
  1. 5
      Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php

5
Mage/Task/BuiltIn/Deployment/Strategy/TarGzTask.php

@ -47,7 +47,6 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware
$excludes = $this->getExcludes(); $excludes = $this->getExcludes();
$excludesListFilePath = $this->getConfig()->deployment('excludes_file', ''); $excludesListFilePath = $this->getConfig()->deployment('excludes_file', '');
;
// If we are working with releases // If we are working with releases
$deployToDirectory = $this->getConfig()->deployment('to'); $deployToDirectory = $this->getConfig()->deployment('to');
@ -65,6 +64,10 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware
$remoteTarGz = basename($localTarGz); $remoteTarGz = basename($localTarGz);
$excludeCmd = ''; $excludeCmd = '';
foreach ($excludes as $excludeFile) { foreach ($excludes as $excludeFile) {
if (strpos($excludeFile, '*') !== false) {
$excludeFile = '"' . $excludeFile . '"';
}
$excludeCmd .= ' --exclude=' . $excludeFile; $excludeCmd .= ' --exclude=' . $excludeFile;
} }

Loading…
Cancel
Save