diff --git a/docs/recipe/README.md b/docs/recipe/README.md index 05a922165..1f6ff4130 100644 --- a/docs/recipe/README.md +++ b/docs/recipe/README.md @@ -23,6 +23,7 @@ * [Sulu Recipe](/docs/recipe/sulu.md) * [Symfony Recipe](/docs/recipe/symfony.md) * [TYPO3 Recipe](/docs/recipe/typo3.md) +* [TYPO3-rsync Recipe](/docs/recipe/typo3-rsync.md) * [WordPress Recipe](/docs/recipe/wordpress.md) * [Yii2 Recipe](/docs/recipe/yii.md) * [Zend Framework Recipe](/docs/recipe/zend_framework.md) \ No newline at end of file diff --git a/recipe/typo3-rsync.php b/recipe/typo3-rsync.php new file mode 100644 index 000000000..081ec0332 --- /dev/null +++ b/recipe/typo3-rsync.php @@ -0,0 +1,125 @@ + array_merge(get('shared_dirs'), get('shared_files'), $exclude), + 'exclude-file' => false, + 'include' => ['vendor'], + 'include-file' => false, + 'filter' => ['dir-merge,-n /.gitignore'], + 'filter-file' => false, + 'filter-perdir' => false, + 'flags' => 'avz', + 'options' => ['delete', 'keep-dirlinks', 'links'], + 'timeout' => 600 +]); + +desc('TYPO3 - Cache warmup for all caches'); +task('typo3:cache:warmup', function () { + cd('{{release_path}}'); + run('{{bin/php}} {{bin/typo3}} cache:warmup'); +}); + +desc('TYPO3 - Cache clearing for all caches'); +task('typo3:cache:flush', function () { + cd('{{release_path}}'); + run('{{bin/php}} {{bin/typo3}} cache:flush'); +}); + +desc('TYPO3 - Update the language files of all activated extensions'); +task('typo3:language:update', function () { + cd('{{release_path}}'); + run('{{bin/php}} {{bin/typo3}} language:update'); +}); + +desc('TYPO3 - Set up extensions'); +task('typo3:extension:setup', function () { + cd('{{release_path}}'); + run('{{bin/php}} {{bin/typo3}} extension:setup'); +}); + +/** + * Configure "deploy" task group. + */ +task('deploy:update_code')->hidden()->disable(); +task('deploy:info')->hidden()->disable(); + +desc('Deploys a TYPO3 project'); +task('deploy', [ + 'deploy:setup', + 'deploy:lock', + 'deploy:release', + 'rsync', + 'deploy:shared', + 'deploy:writable', + 'deploy:symlink', + 'typo3:extension:setup', + 'typo3:cache:flush', + 'typo3:language:update', + 'deploy:unlock', + 'deploy:cleanup', + 'deploy:success' +]); + +after('deploy:failed', 'deploy:unlock');