From 5586de7e6388f9ef2b5d1d55b5f19412c672e314 Mon Sep 17 00:00:00 2001 From: Cronfy Date: Tue, 16 Feb 2016 16:07:17 +0300 Subject: [PATCH] rearrange comments --- recipe/common.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipe/common.php b/recipe/common.php index acafce9e..c42924fb 100644 --- a/recipe/common.php +++ b/recipe/common.php @@ -327,16 +327,15 @@ env('releases_list', function () { // find will list only dirs in releases/ $list = run('find {{deploy_path}}/releases -maxdepth 1 -mindepth 1 -type d')->toArray(); - // filter anything that does not look like a release + // filter out anything that does not look like a release foreach ($list as $key => $item) { - // name does not match $item = basename($item); // strip path returned from find // release dir can look like this: 20160216152237 or 20160216152237.1.2.3.4 ... $name_match = '[0-9]{14}'; // 20160216152237 $extension_match = '\.[0-9]+'; // .1 or .15 etc if (!preg_match("/^$name_match($extension_match)*$/", $item)) { - unset($list[$key]); + unset($list[$key]); // dir name does not match pattern, throw it out continue; }