keep_releases not work #3511
Replies: 6 comments 9 replies
-
sorry @antonmedv, have i write something wrong? why did you close the issue? |
Beta Was this translation helpful? Give feedback.
-
Maybe he thought it is an old bug which was fixed in 7.2? But if you have the problem with the newest version, we should fix it :-) |
Beta Was this translation helpful? Give feedback.
-
I think keep_releases working as expected. We have a test for this featue. So we can't reproduce the issue without any more additional context. |
Beta Was this translation helpful? Give feedback.
-
hi @antonmedv this is the task task('deploy', [ deploy works as expected, but the releases increase progressively without canceling the others as I expect. They also don't stop at 10 as I read that the new default value is 10 instead of 5. |
Beta Was this translation helpful? Give feedback.
-
Can't reproduce. Please, debug. |
Beta Was this translation helpful? Give feedback.
-
This workaround solved the problem for us. Add to your deploy.php file: desc('Fix release_log file');
task('fix:release_log', function() {
cd('{{deploy_path}}');
if(test('[ -f .dep/releases_log ]')) {
$releasesLog = implode("\n", array_map(function($line) {
if(json_decode($line) === null) {
$line = str_replace('{ ', '{ "', str_replace(' }', '" }', $line));
$line = str_replace(' : ', '": "', str_replace(' , ', '", "', $line));
}
return $line;
}, explode("\n", run('cat .dep/releases_log'))));
run("echo '" . str_replace("'", "'\\''", $releasesLog) . "' > .dep/releases_log");
}
}); Then, add |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Set parameter:
set('keep_releases', 2);
Not affected, and version go over the default 10 number.
Beta Was this translation helpful? Give feedback.
All reactions