Merge pull request #1042 from crosma/master

Fixed old releases not being cleaned up when keep_releases reduced by than half.
This commit is contained in:
Anton Medvedev 2017-02-22 14:57:36 +07:00 committed by GitHub
commit 98a77dc411
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@
- 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 [#1004](https://github.com/deployphp/deployer/issues/1004) [#1036](https://github.com/deployphp/deployer/pull/1036/)
- Fixed possibility to use PEM files with Native SSH
- Fixed old releases not being cleaned up when keep_releases reduced by more than half.
### Changed
- Add task queue:restart for Laravel recipe [#1007](https://github.com/deployphp/deployer/pull/1007)

View File

@ -59,7 +59,8 @@ set('releases_list', function () {
// will output a really big list of previous releases.
// It spoils appearance of output log, to make it pretty,
// we limit it to `n*2 + 5` lines from end of file (15 lines).
$csv = run("tail -n " . ($keepReleases * 2 + 5) . " .dep/releases");
// Always read as many lines as there are release directories.
$csv = run("tail -n " . max(count($releases), ($keepReleases * 2 + 5)) . " .dep/releases");
}
$metainfo = Csv::parse($csv);