mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-23 08:45:04 +01:00
Laravel view cache task (#1860)
* Substituted laravel view:clear command with view:cache command * Added version check to view:cache task * Updated Changelog
This commit is contained in:
parent
82a00248fb
commit
0fc524ee58
@ -12,6 +12,7 @@
|
||||
### Changed
|
||||
- Add lock and unlock task to flow_framework receipe
|
||||
- Updated `artisan:optimize` to run for Laravel 5.7 and above, since [it got added back](https://github.com/laravel/framework/commit/fe1cbdf3b51ce1235b8c91f5e603f1e9306e4f6f) last year. It still doesn't run for 5.5 and below.
|
||||
- View:clear command to a new view:cache command
|
||||
|
||||
### Fixed
|
||||
- Fix rsync upload honor become option for host [#1796]
|
||||
|
@ -103,9 +103,16 @@ 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;
|
||||
$currentVersion = get('laravel_version');
|
||||
|
||||
if (version_compare($currentVersion, $needsVersion, '>=')) {
|
||||
run('{{bin/php}} {{release_path}}/artisan view:cache');
|
||||
} else {
|
||||
run('{{bin/php}} {{release_path}}/artisan view:clear');
|
||||
}
|
||||
});
|
||||
|
||||
desc('Execute artisan optimize');
|
||||
@ -186,7 +193,7 @@ task('deploy', [
|
||||
'deploy:vendors',
|
||||
'deploy:writable',
|
||||
'artisan:storage:link',
|
||||
'artisan:view:clear',
|
||||
'artisan:view:cache',
|
||||
'artisan:config:cache',
|
||||
'artisan:optimize',
|
||||
'deploy:symlink',
|
||||
|
Loading…
x
Reference in New Issue
Block a user