File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 4545 'var ' ,
4646]);
4747
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+
4855task ('sw:deploy:vendors_recovery ' , static function () {
4956 if (test ('[ -d vendor/shopware/recovery ] ' )) {
5057 run ('{{bin/composer}} {{composer_action}} -d vendor/shopware/recovery {{composer_options}} 2>&1 ' );
6067// visits the website, doesn't have to wait for the cache to be built up.
6168task ('sw:cache:warmup ' , static function () {
6269 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+ }
6475});
6576
6677// 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