From 9dcd4eeab1754fdf9ccb8538c42edbb4c0cd3a94 Mon Sep 17 00:00:00 2001 From: Matthew Muscat Date: Tue, 30 Jul 2019 17:39:03 +1000 Subject: [PATCH] Update Laravel View Cache commands (#1889) * Update artisan cache commands - Re-add `artisan:view:clear` command - Modify the existing `artisan:view:cache` command to remove the call to clear the cache, as this is already completed by the Laravel Framework * Updated changelog with laravel view cache changes * Update CHANGELOG.md Update newline spacing to fix scrutinizer failure --- CHANGELOG.md | 4 ++++ recipe/laravel.php | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7300eae1..2036beba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,12 @@ ## master [v6.4.5...master](https://github.com/deployphp/deployer/compare/v6.4.5...master) +### Added +- Re-added the `artisan:view:clear` task + ### Changed - Change the default shared files in the Symfony4 recipe. The .env file is versionned now and not the .env.local [#1881] +- Change the `artisan:view:cache` task to only run the `view:cache` command ## v6.4.5 diff --git a/recipe/laravel.php b/recipe/laravel.php index 08dacf39..8fc00b65 100644 --- a/recipe/laravel.php +++ b/recipe/laravel.php @@ -103,6 +103,11 @@ task('artisan:route:cache', function () { run('{{bin/php}} {{release_path}}/artisan route:cache'); }); +desc('Execute artisan view:clear'); +task('artisan:view:clear', function () { + run('{{bin/php}} {{release_path}}/artisan view:clear'); +}); + desc('Execute artisan view:cache'); task('artisan:view:cache', function () { $needsVersion = 5.6; @@ -110,8 +115,6 @@ task('artisan:view:cache', function () { if (version_compare($currentVersion, $needsVersion, '>=')) { run('{{bin/php}} {{release_path}}/artisan view:cache'); - } else { - run('{{bin/php}} {{release_path}}/artisan view:clear'); } });