From 5b0a8d8e4cd7826d2ec80e73451e3782b1ddc68e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Monta=C3=B1ez?= Date: Mon, 2 Jan 2017 23:56:54 -0300 Subject: [PATCH] [Nostromo] Wrap Tar excludes --- src/Mage/Task/BuiltIn/Deploy/TarGz/PrepareTask.php | 2 +- src/Mage/Tests/Command/BuiltIn/DeployCommandTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mage/Task/BuiltIn/Deploy/TarGz/PrepareTask.php b/src/Mage/Task/BuiltIn/Deploy/TarGz/PrepareTask.php index 0830536..2027d81 100644 --- a/src/Mage/Task/BuiltIn/Deploy/TarGz/PrepareTask.php +++ b/src/Mage/Task/BuiltIn/Deploy/TarGz/PrepareTask.php @@ -54,7 +54,7 @@ class PrepareTask extends AbstractTask $excludes = array_merge(['.git'], $excludes); foreach ($excludes as &$exclude) { - $exclude = '--exclude=' . $exclude; + $exclude = '--exclude="' . $exclude . '"'; } return implode(' ', $excludes); diff --git a/src/Mage/Tests/Command/BuiltIn/DeployCommandTest.php b/src/Mage/Tests/Command/BuiltIn/DeployCommandTest.php index e4a801a..64aeeb9 100644 --- a/src/Mage/Tests/Command/BuiltIn/DeployCommandTest.php +++ b/src/Mage/Tests/Command/BuiltIn/DeployCommandTest.php @@ -107,7 +107,7 @@ class DeployCommandTest extends TestCase 2 => 'git pull', 3 => 'composer install --dev', 4 => 'composer dumpautoload --optimize', - 5 => 'tar cfz /tmp/mageXYZ --exclude=.git --exclude=vendor --exclude=app/cache --exclude=app/log --exclude=web/app_dev.php ./', + 5 => 'tar cfz /tmp/mageXYZ --exclude=".git" --exclude="vendor" --exclude="app/cache" --exclude="app/log" --exclude="web/app_dev.php" ./', 6 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost sh -c \\"mkdir -p /var/www/test/releases/1234567890\\"', 7 => 'scp -P 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/mageXYZ tester@testhost:/var/www/test/releases/1234567890/mageXYZ', 8 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost sh -c \\"cd /var/www/test/releases/1234567890 \\&\\& tar xfz mageXYZ\\"', @@ -198,7 +198,7 @@ class DeployCommandTest extends TestCase 2 => 'git pull', 3 => 'composer install --dev', 4 => 'composer dumpautoload --optimize', - 5 => 'tar cfz /tmp/mageXYZ --exclude=.git --exclude=vendor --exclude=app/cache --exclude=app/log --exclude=web/app_dev.php ./', + 5 => 'tar cfz /tmp/mageXYZ --exclude=".git" --exclude="vendor" --exclude="app/cache" --exclude="app/log" --exclude="web/app_dev.php" ./', 6 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost sh -c \\"mkdir -p /var/www/test/releases/1234567890\\"', 7 => 'scp -P 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/mageXYZ tester@testhost:/var/www/test/releases/1234567890/mageXYZ', 8 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost sh -c \\"cd /var/www/test/releases/1234567890 \\&\\& tar xfz mageXYZ\\"',