From 97093c4b418bfaa2402406a13cc6f0eba6e6a414 Mon Sep 17 00:00:00 2001 From: Thomas Spitzer Date: Mon, 6 Mar 2017 20:47:06 +0100 Subject: [PATCH] Add tar_from parameter to deploy specific directories Equvalent 'from' parameter as in version 1 to deploy from a specific directory instead of the current root directory. --- src/Task/BuiltIn/Deploy/Tar/PrepareTask.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Task/BuiltIn/Deploy/Tar/PrepareTask.php b/src/Task/BuiltIn/Deploy/Tar/PrepareTask.php index e694f8f..c52d783 100644 --- a/src/Task/BuiltIn/Deploy/Tar/PrepareTask.php +++ b/src/Task/BuiltIn/Deploy/Tar/PrepareTask.php @@ -42,7 +42,8 @@ class PrepareTask extends AbstractTask $excludes = $this->getExcludes(); $flags = $this->runtime->getEnvOption('tar_create', 'cfzp'); - $cmdTar = sprintf('tar %s %s %s ./', $flags, $tarLocal, $excludes); + $from = $this->runtime->getEnvOption('tar_from', './'); + $cmdTar = sprintf('tar %s %s %s %s', $flags, $tarLocal, $excludes, $from); /** @var Process $process */ $process = $this->runtime->runLocalCommand($cmdTar, 300);