Ask a Question
Back to All

Force theme assets to deploy

I'm not sure if these questions are read but my love for the CMS part of LocomotiveCMS is being dulled by the obscurity and obtuseness of the Wagon deploy process.

Current issue is that unless a file is physically edited it appears to be assumed to be the same. If I drop a new file that has the same name as a previous one it is ignored(skipped). Obviously if it is an image file or similar this becomes problematic.

I am trying to force all assets to be redeployed to overwrite the existing ones to get everything in sync. No matter what I have tried ( even deleting all the deployed assets ) every time I run deploy to local engine it skips all the ThemeAssets but appears to push everything else. I suspect some caching issue or failure to reload the current assets or similar may be to blame.


I worked my way to the file push_theme_assets_command.rb and this appears to be where it is checked.

and commenting out this line 26 gets me a bit further.

raise SkipPersistingException.new if same?(decorated_entity, _entity)

To get round this I commented it out and that gets me a bit further. Perhaps a -f flag on the deploy command could be used to force all assets to be replaced?