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

Support for propshaft #257

Open
jcoyne opened this issue Sep 7, 2022 · 4 comments
Open

Support for propshaft #257

jcoyne opened this issue Sep 7, 2022 · 4 comments

Comments

@jcoyne
Copy link

jcoyne commented Sep 7, 2022

Similar to #235, when using propshaft rather than sprockets

the deploy:assets:backup_manifest task fails because propshaft makes a manifest named: public/assets/.manifest.json which does not match the existing patterns in :assets_manifests

@mattbrictson
Copy link
Member

@jcoyne can you help me understand what supporting propshaft would entail? Is this a matter of updating the capistrano-rails REAMDE with some guidance on what value propshaft users should use for :assets_manifests, or is it a more fundamental code change?

@jcoyne
Copy link
Author

jcoyne commented Sep 8, 2022

@mattbrictson I imaging it would just add a new pattern in here:

%w[.sprockets-manifest* manifest*.*].map do |pattern|
that matches the manifest that Propshaft uses:
https://github.com/rails/propshaft/blob/793a20e74201cd6c97f22fb8df75f353e7aebe5b/lib/propshaft/processor.rb#L4

@jcoyne
Copy link
Author

jcoyne commented Sep 8, 2022

I've done this and it works as a workaround:

set :assets_manifests, -> {
    [release_path.join("public", fetch(:assets_prefix), '.manifest.json')]
}

But now that propshaft is included by Rails, it makes sense to make this a default part of capistrano-rails.

@HLFH
Copy link

HLFH commented Jun 19, 2023

I have set in config/deploy.rb:

set :assets_manifests, -> {
    [release_path.join("public", fetch(:assets_prefix), '.manifest.json')]
}

as advised.

And this works well with propshaft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants