@@ -74,20 +74,20 @@ discard block |
||
| 74 | 74 | ]); |
| 75 | 75 | |
| 76 | 76 | // This sets the Shopware version to the version of the Shopware console command. |
| 77 | -set('shopware_version', function () { |
|
| 77 | +set('shopware_version', function() { |
|
| 78 | 78 | $versionOutput = run('cd {{release_path}} && {{bin/console}} -V'); |
| 79 | 79 | preg_match('/(\d+\.\d+\.\d+\.\d+)/', $versionOutput, $matches); |
| 80 | 80 | return $matches[0] ?? '6.6.0'; |
| 81 | 81 | }); |
| 82 | 82 | |
| 83 | 83 | // This task remotely executes the `cache:clear` console command on the target server. |
| 84 | -task('sw:cache:clear', static function () { |
|
| 84 | +task('sw:cache:clear', static function() { |
|
| 85 | 85 | run('cd {{release_path}} && {{bin/console}} cache:clear --no-warmup'); |
| 86 | 86 | }); |
| 87 | 87 | |
| 88 | 88 | // This task remotely executes the cache warmup console commands on the target server, so that the first user, who |
| 89 | 89 | // visits the website, doesn't have to wait for the cache to be built up. |
| 90 | -task('sw:cache:warmup', static function () { |
|
| 90 | +task('sw:cache:warmup', static function() { |
|
| 91 | 91 | run('cd {{release_path}} && {{bin/console}} cache:warmup'); |
| 92 | 92 | |
| 93 | 93 | // Shopware 6.6+ dropped support for the http:cache:warmup command, so only execute it if the version is less than 6.6 |
@@ -97,25 +97,25 @@ discard block |
||
| 97 | 97 | }); |
| 98 | 98 | |
| 99 | 99 | // This task remotely executes the `database:migrate` console command on the target server. |
| 100 | -task('sw:database:migrate', static function () { |
|
| 100 | +task('sw:database:migrate', static function() { |
|
| 101 | 101 | run('cd {{release_path}} && {{bin/console}} database:migrate --all'); |
| 102 | 102 | }); |
| 103 | 103 | |
| 104 | -task('sw:plugin:refresh', function () { |
|
| 104 | +task('sw:plugin:refresh', function() { |
|
| 105 | 105 | run('cd {{release_path}} && {{bin/console}} plugin:refresh'); |
| 106 | 106 | }); |
| 107 | 107 | |
| 108 | -task('sw:scheduled-task:register', function () { |
|
| 108 | +task('sw:scheduled-task:register', function() { |
|
| 109 | 109 | run('cd {{release_path}} && {{bin/console}} scheduled-task:register'); |
| 110 | 110 | }); |
| 111 | 111 | |
| 112 | -task('sw:theme:refresh', function () { |
|
| 112 | +task('sw:theme:refresh', function() { |
|
| 113 | 113 | run('cd {{release_path}} && {{bin/console}} theme:refresh'); |
| 114 | 114 | }); |
| 115 | 115 | |
| 116 | 116 | // This task is not used by default, but can be used, e.g. in combination with `SHOPWARE_SKIP_THEME_COMPILE=1`, |
| 117 | 117 | // to build the theme remotely instead of locally. |
| 118 | -task('sw:theme:compile', function () { |
|
| 118 | +task('sw:theme:compile', function() { |
|
| 119 | 119 | run('cd {{release_path}} && {{bin/console}} theme:compile'); |
| 120 | 120 | }); |
| 121 | 121 | |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | return $plugins; |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | -task('sw:plugin:update:all', static function () { |
|
| 130 | +task('sw:plugin:update:all', static function() { |
|
| 131 | 131 | $plugins = getPlugins(); |
| 132 | 132 | foreach ($plugins as $plugin) { |
| 133 | 133 | if ($plugin->installedAt && $plugin->upgradeVersion) { |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | }); |
| 139 | 139 | |
| 140 | -task('sw:writable:jwt', static function () { |
|
| 140 | +task('sw:writable:jwt', static function() { |
|
| 141 | 141 | if (!test('[ -d {{deploy_path}}/config/jwt/ ]')) { |
| 142 | 142 | return; |
| 143 | 143 | } |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | 'deploy:publish', |
| 168 | 168 | ]); |
| 169 | 169 | |
| 170 | -task('deploy:update_code')->setCallback(static function () { |
|
| 170 | +task('deploy:update_code')->setCallback(static function() { |
|
| 171 | 171 | upload('.', '{{release_path}}', [ |
| 172 | 172 | 'options' => [ |
| 173 | 173 | '--exclude=.git', |
@@ -177,11 +177,11 @@ discard block |
||
| 177 | 177 | ]); |
| 178 | 178 | }); |
| 179 | 179 | |
| 180 | -task('sw-build-without-db:get-remote-config', static function () { |
|
| 180 | +task('sw-build-without-db:get-remote-config', static function() { |
|
| 181 | 181 | if (!test('[ -d {{current_path}} ]')) { |
| 182 | 182 | return; |
| 183 | 183 | } |
| 184 | - within('{{current_path}}', function () { |
|
| 184 | + within('{{current_path}}', function() { |
|
| 185 | 185 | run('{{bin/php}} ./bin/console bundle:dump'); |
| 186 | 186 | download('{{current_path}}/var/plugins.json', './var/'); |
| 187 | 187 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | }); |
| 191 | 191 | }); |
| 192 | 192 | |
| 193 | -task('sw-build-without-db:build', static function () { |
|
| 193 | +task('sw-build-without-db:build', static function() { |
|
| 194 | 194 | runLocally('CI=1 SHOPWARE_SKIP_BUNDLE_DUMP=1 ./bin/build-js.sh'); |
| 195 | 195 | }); |
| 196 | 196 | |