fix: build theme assets before composer install
Composer publishes an extension's Resources/Public as public/_assets/<hash> only if the directory exists when it runs. The theme's is created by the asset build, so it has to run first; otherwise the release has no _assets link for ep_theme and the theme CSS/JS answer 404. The build now checks the link. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
4a9777c56a
commit
bb1901fed6
1 file changed
+4
-1
+4
-1
@@ -92,8 +92,11 @@ task('build', function () {
|
||||
: 'ddev exec bash -c ' . escapeshellarg($command));
|
||||
runLocally('rm -rf {{build_dir}} && mkdir -p {{build_dir}}');
|
||||
runLocally('git archive HEAD | tar -x -C {{build_dir}}');
|
||||
$exec('cd var/deploy-build && composer install --no-dev --prefer-dist --no-progress --no-interaction --optimize-autoloader');
|
||||
// Assets first: Composer only publishes an extension's Resources/Public as public/_assets/<hash>
|
||||
// if the directory exists when it runs, and the theme's is created by the build
|
||||
$exec('cd var/deploy-build && npm ci --no-audit --no-fund && npm run build');
|
||||
$exec('cd var/deploy-build && composer install --no-dev --prefer-dist --no-progress --no-interaction --optimize-autoloader');
|
||||
runLocally('test -L {{build_dir}}/public/_assets/' . md5('/vendor/ep/ep-theme/') . ' && test -f {{build_dir}}/packages/ep_theme/Resources/Public/entrypoints.json');
|
||||
})->once();
|
||||
|
||||
desc('Read-only checks of the host before the first deploy (see .ddev/plans/TYPO3-13-GO-LIVE.md)');
|
||||
|
||||
Reference in new issue
Block a user