fix: TYPO3 caches are flushed after a rollback too

Pages cached while the other release was live survived the switch
(seen after the rollback test: alvac served old favicon paths until a
manual cache:flush). The flush task runs in current_path, which is the
new release after a deploy and the previous one after a rollback.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
frommeandClaude Opus 5.5 committed 2026-10-24 14:44:08 +02:00
1 parent 873579d5b0
commit 419ffe42b8
1 file changed
+3 -1
+3 -1
View File
@@ -154,7 +154,7 @@ task('typo3:extension:setup', function () {
desc('TYPO3 - Clear all caches');
task('typo3:cache:flush', function () {
run('{{bin/php}} {{release_path}}/{{bin/typo3}} cache:flush');
run('{{bin/php}} {{current_path}}/{{bin/typo3}} cache:flush');
});
desc('Link the production fileadmin into the release');
@@ -192,5 +192,7 @@ task('deploy', [
// is the static docroot. Not needed either: the front controller stubs in the static docroots resolve
// "current" with readlink() on every request, so a new release is always loaded under new paths.
after('deploy:symlink', 'typo3:cache:flush');
// A rollback switches the code back; pages cached by the other release must not survive it
after('rollback', 'typo3:cache:flush');
after('deploy:failed', 'deploy:unlock');