-
Notifications
You must be signed in to change notification settings - Fork 47
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
CLI-1398: ACLI does not copy the paths defined in installer-paths when {$name} is used #1797
Comments
sorry, pls ignore my ^^ comment. I am able to reproduce the same |
There is more to it. I was testing and I believe the "Forcibly copy" part is also wrong, or the timing of the pre acli push artifact hook.
Weirdly I am getting a css folder which contains something unrelated to the theme, no idea why. This was because I used npm-asset as the type for the installer path composer got confused for some reason, use drupal-custom-theme. @joshirohit100 proposed using a post-install-cmd script in composer, which could potentially work in unison with the installer path, but we come back to the multisite / ACSF issue of having multiple files and also, this forces devs to go through the theme compilation every time composer install runs. That is not ideal. |
Adding this should work and not pre-acli hook
The Now later in push artifact command, steps are -
The step removes the vendor https://github.com/acquia/cli/blob/main/src/Command/Push/PushArtifactCommand.php#L239 -> this removes all the themes and hence FE assets also lost When we do later in post composer step, then assets is available while acli commiting the full directory |
@joshirohit100 that is a viable workaround. Still forces the theme compilation on every composer install or any task that runs composer install. If the theme compilation migh need more complex task, and add several possible themes doing this, this can add a wait of several minutes on every composer install. It is workable, but I don't believe it will be nice. I confirm that rohit workaround works, I still believe we need a native Acquia solution to deploy code to Acquia. |
Why would you include cli/src/Command/Push/PushArtifactCommand.php Line 428 in 8c65600
As far as actually compiling the theme, that is well beyond the scope of Acquia CLI. Rohit is correct that a post-composer-install hook is the best way to do that. |
Describe the bug
When using acli push:artifact to deploy code ACLI by default does not copy the compiled assets of the custom themes.
Acquia provided a solution per this doc: https://docs.acquia.com/acquia-cloud-platform/add-ons/acquia-cli/known-issues#section-artifact-does-not-include-front-end-build-assets
This does not work when the installer path is created like this in composer.json:
The files are not copied.
This type of installer path is important when using several tcustom themes like multisites and ACSF.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
ACLI should follow the standard use of installer paths and when finding {$name} in a path definition, it should create 1 entry per each subfolder or use some sort of * pattern to copy all possible ocurrences of the folders.
Screenshots
Additional context
In
cli/src/Command/Push/PushArtifactCommand.php
Line 427 in 456c3ba
The text was updated successfully, but these errors were encountered: