mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-23 16:54:08 +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
|
### Changed
|
||||||
- Add lock and unlock task to flow_framework receipe
|
- 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.
|
- 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
|
### Fixed
|
||||||
- Fix rsync upload honor become option for host [#1796]
|
- 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');
|
run('{{bin/php}} {{release_path}}/artisan route:cache');
|
||||||
});
|
});
|
||||||
|
|
||||||
desc('Execute artisan view:clear');
|
desc('Execute artisan view:cache');
|
||||||
task('artisan:view:clear', function () {
|
task('artisan:view:cache', function () {
|
||||||
run('{{bin/php}} {{release_path}}/artisan view:clear');
|
$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');
|
desc('Execute artisan optimize');
|
||||||
@ -186,7 +193,7 @@ task('deploy', [
|
|||||||
'deploy:vendors',
|
'deploy:vendors',
|
||||||
'deploy:writable',
|
'deploy:writable',
|
||||||
'artisan:storage:link',
|
'artisan:storage:link',
|
||||||
'artisan:view:clear',
|
'artisan:view:cache',
|
||||||
'artisan:config:cache',
|
'artisan:config:cache',
|
||||||
'artisan:optimize',
|
'artisan:optimize',
|
||||||
'deploy:symlink',
|
'deploy:symlink',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user