File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 45
45
'var ' ,
46
46
]);
47
47
48
+ // This sets the shopware version to the version of the shopware console command.
49
+ set ('shopware_version ' , function () {
50
+ $ versionOutput = run ('cd {{release_path}} && bin/console -V ' );
51
+ preg_match ('/(\d+\.\d+\.\d+\.\d+)/ ' , $ versionOutput , $ matches );
52
+ return $ matches [0 ] ?? '6.6.0 ' ;
53
+ });
54
+
48
55
task ('sw:deploy:vendors_recovery ' , static function () {
49
56
if (test ('[ -d vendor/shopware/recovery ] ' )) {
50
57
run ('{{bin/composer}} {{composer_action}} -d vendor/shopware/recovery {{composer_options}} 2>&1 ' );
60
67
// visits the website, doesn't have to wait for the cache to be built up.
61
68
task ('sw:cache:warmup ' , static function () {
62
69
run ('cd {{release_path}} && bin/console cache:warmup ' );
63
- run ('cd {{release_path}} && bin/console http:cache:warm:up ' );
70
+
71
+ // Shopware 6.6+ dropped support for the http:cache:warmup command, so only execute it if the version is less than 6.6
72
+ if (version_compare (get ('shopware_version ' ), '6.6.0 ' , '<= ' )) {
73
+ run ('cd {{release_path}} && bin/console http:cache:warm:up ' );
74
+ }
64
75
});
65
76
66
77
// This task remotely executes the `database:migrate` console command on the target server.
You can’t perform that action at this time.
0 commit comments