mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 01:02:24 +01:00
rearrange comments
This commit is contained in:
parent
869ef92769
commit
5586de7e63
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user