From baa84b8292dafa1df383d1ba4cb2f83e6a5602fc Mon Sep 17 00:00:00 2001 From: Matt Crossley Date: Tue, 21 Feb 2017 01:38:38 -0800 Subject: [PATCH 1/2] Fixed an issue with the output of `ls`. Forces single column output and trims newlines. --- recipe/deploy/release.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipe/deploy/release.php b/recipe/deploy/release.php index 5c6adc2b..7697b835 100644 --- a/recipe/deploy/release.php +++ b/recipe/deploy/release.php @@ -37,11 +37,11 @@ set('releases_list', function () { } // Will list only dirs in releases. - $list = run('cd releases && ls -t -d */')->toArray(); + $list = run('cd releases && ls -t -1 -d */')->toArray(); // Prepare list. $list = array_map(function ($release) { - return basename(rtrim($release, '/')); + return basename(rtrim(trim($release), '/')); }, $list); $releases = []; // Releases list. From 2366fac3584e9583319910b765bdd47329fab12d Mon Sep 17 00:00:00 2001 From: Matt Crossley Date: Tue, 21 Feb 2017 01:46:53 -0800 Subject: [PATCH 2/2] Updated changelog. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfb243a3..a70510d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ - Fixed `Can not share same dirs` for shared folders having similar names [#995](https://github.com/deployphp/deployer/issues/995) - Fixed scalar override on recursive option merge [#1003](https://github.com/deployphp/deployer/pull/1003) - Fixed incompatible PHP 7.0 syntax [#1020](https://github.com/deployphp/deployer/pull/1020) - +- Fixed an issue with the output of ls in releases_list that was breaking cleanup. ### Changed - Add task queue:restart for Laravel recipe [#1007](https://github.com/deployphp/deployer/pull/1007)