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

Remove absolute file paths from theme-config using the deploy_path #2801

Merged
merged 6 commits into from
Mar 12, 2022
Merged
Show file tree
Hide file tree
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
14 changes: 0 additions & 14 deletions docs/recipe/shopware.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,6 @@ This task is group task which contains next tasks:



### sw-build-without-db:build
[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L166)






### sw-build-without-db
[Source](https://github.com/deployphp/deployer/blob/master/recipe/shopware.php#L170)






This task is group task which contains next tasks:
Expand Down
13 changes: 11 additions & 2 deletions recipe/shopware.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,17 @@ function getPlugins(): array
download('{{deploy_path}}/current/files/theme-config', './files/');

// Temporary workaround to remove absolute file paths in Shopware <6.4.6.0
// See https://github.com/shopware/platform/commit/01c8ff86c7d8d3bee1888a26c24c9dc9b4529cbc and https://issues.shopware.com/issues/NEXT-17720
runLocally('sed -i "" -E \'s/\\\\\/var\\\\\/www\\\\\/htdocs\\\\\/releases\\\\\/[0-9]+\\\\\///g\' files/theme-config/* || true');
// See:
// - https://github.com/shopware/platform/commit/01c8ff86c7d8d3bee1888a26c24c9dc9b4529cbc
// - https://issues.shopware.com/issues/NEXT-17720
// - https://github.com/deployphp/deployer/issues/2754
$deployPath = get('deploy_path');
if (substr($deployPath, -1, 1) !== '/') {
$deployPath .= '/';
}
$deployPath .= 'releases/[0-9a-zA-Z]*/';
$escapedDeployPath = str_replace('/', '\\\\/', $deployPath);
runLocally("sed -iE 's#${escapedDeployPath}##g' files/theme-config/* || true");
});
});

Expand Down