Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Merge details:

commit 045ad23
Author: Jelle Sebreghts <[email protected]>
Date:   Mon May 6 15:28:24 2019

    Keep 2 backups so we have an extra one when there is a sync, then a
    deploy.
  • Loading branch information
Jelle-S committed May 6, 2019
2 parents fc388d3 + 045ad23 commit 02d05cb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/AbstractRoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -1084,10 +1084,13 @@ protected function cleanDirsTask($worker, AbstractAuth $auth, $remote)
$task = $this->taskSsh($worker, $auth)
->remoteDirectory($remote['rootdir'], true)
->timeout($this->getTimeoutSetting('clean_dir'))
->exec('vendor/bin/robo digipolis:clean-dir ' . $remote['releasesdir'] . ($cleandirLimit ? ':' . $cleandirLimit : ''));
// Keep one more release than the clean_dir setting, we would like
// to keep `clean_dir` amount of releases, *not* counting the
// current one.
->exec('vendor/bin/robo digipolis:clean-dir ' . $remote['releasesdir'] . ($cleandirLimit ? ':' . ($cleandirLimit + 1) : ''));

if ($remote['createbackup']) {
$task->exec('vendor/bin/robo digipolis:clean-dir ' . $remote['backupsdir'] . ($cleandirLimit ? ':' . --$cleandirLimit : ''));
$task->exec('vendor/bin/robo digipolis:clean-dir ' . $remote['backupsdir'] . ($cleandirLimit ? ':' . $cleandirLimit : ''));
}

return $task;
Expand Down

0 comments on commit 02d05cb

Please sign in to comment.