Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes for using latest shopware flex template #3586

Merged
merged 1 commit into from
Apr 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions recipe/shopware.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@
* set('repository', 'git@github.com:shopware/production.git');
* ```
*
* configure host:
* host('SSH-HOSTNAME')
* ->setRemoteUser('SSH-USER')
* ->set('deploy_path', '/var/www/shopware') // This is the path, where deployer will create its directory structure
* ->set('http_user', 'www-data') // Not needed, if the `user` is the same user, the webserver is running with
* ->set('writable_mode', 'chmod');
*
* :::note
* Please remember that the installation must be modified so that it can be
* [build without database](https://developer.shopware.com/docs/guides/hosting/installation-updates/deployments/build-w-o-db#compiling-the-storefront-without-database).
* :::
*/
namespace Deployer;


require_once __DIR__ . '/common.php';

add('recipes', ['shopware']);
Expand All @@ -23,6 +31,8 @@

set('default_timeout', 3600); // Increase when tasks take longer than that.

//set host configuration and repository here

// These files are shared among all releases.
set('shared_files', [
'.env',
Expand Down Expand Up @@ -83,6 +93,10 @@
run('cd {{release_path}} && {{bin/console}} theme:refresh');
});

task('sw:theme:compile', function () {
run('cd {{release_path}} && {{bin/console}} theme:compile');
});

function getPlugins(): array
{
$output = explode("\n", run('cd {{release_path}} && {{bin/console}} plugin:list'));
Expand Down Expand Up @@ -132,10 +146,11 @@ function getPlugins(): array
/**
* Grouped SW deploy tasks.
*/

task('sw:deploy', [
'sw:database:migrate',
'sw:plugin:refresh',
'sw:theme:refresh',
'sw:theme:compile',
'sw:cache:clear',
'sw:plugin:update:all',
'sw:cache:clear',
Expand All @@ -151,7 +166,6 @@ function getPlugins(): array
'deploy:publish',
]);


task('sw-build-without-db:get-remote-config', static function () {
if (!test('[ -d {{current_path}} ]')) {
return;
Expand All @@ -166,9 +180,10 @@ function getPlugins(): array
});

task('sw-build-without-db:build', static function () {
runLocally('CI=1 SHOPWARE_SKIP_BUNDLE_DUMP=1 ./bin/build-js.sh');
runLocally('CI=1 SHOPWARE_SKIP_BUNDLE_DUMP=1 SHOPWARE_SKIP_THEME_COMPILE=1 bin/build-js.sh');
});


task('sw-build-without-db', [
'sw-build-without-db:get-remote-config',
'sw-build-without-db:build',
Expand Down