-
Notifications
You must be signed in to change notification settings - Fork 346
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
Calculation of local_files_to_upload is incorrect #19
Comments
Similarly, shouldn't this:
be changed to:
Otherwise, we'll attempt to delete files that don't yet exist on S3? |
If these changes are made, then |
Thanks! Version 0.1.10 should solve this. Let me know if there are any further issues. |
This seems to only decide which files to upload based on filename and not whether the contents have changed?
|
@levent we're using this with sprockets + hashed filenames, so the filename differs whenever its content changes. it's ideal to do this for static files, as it allows files to be cached indefinitely. |
@jasonhutchens we do the same. However, we also have some static files 500.html for example that just refer to application.css as we cannot update them every commit to point to the correct fingerprinted asset. Unfortunately that means that application.css is always out of date, unless we delete it from S3 prior to running asset_sync. I imagine others do the same within static files or on remote apps that include js / css from remote apps using the asset pipeline. |
Guys. Digest assets are the way forward here. To check the digests of the assets (on S3) themselves when uploading This is redundant if the asset has a digest in it's file name. I understand it is useful to reference assets staticly, however I I have started on a pull request into Rails to completely move the Sound good? Other things that we could do would be an asset_sync "clean" rake Sent from my tiny Internet machine On 20 Mar 2012, at 14:23, Levent Ali
|
David, I agree 100% on moving the rest of the public directory into the asset pipeline. However, in the meantime some sort of "clean before compile" rake task would be very useful for us in production. I could look at submitting a pull request instead of just grumbling about it here though :) Cheers |
Cool cool. I'm in the mountains at the moment and will look at this next week! Sent from my tiny Internet machine On 20 Mar 2012, at 19:05, Levent Ali
|
In
AssetSync::Storage::upload_files
, the list of files to upload is calculates as follows:This means that
asset_sync
will attempt to upload files that are present inremote_files
but which are not present inlocal_files
. This will break if, for example, theassets
directory is cleaned, but old versions of assets are being kept on S3. Perhaps this should be changed to:The text was updated successfully, but these errors were encountered: