Preserving asset file date when publishing
Closedopened 1 year ago by aumouvantsillage · 4 comments
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Let's consider that I have a project with the following layout:
assetssubfolder, e.g. for fonts.
When I want to publish my project on the web, I usually run:
raco pollen publish src pub
rsync pub/ user@server:dest/
As far as I can tell,
raco pollen publishcopies the files from my
assetsfolder even if they have not changed, and does not preserve the date of the original files.
As a consequence,
rsyncthinks those files have changed and reuploads them every time.
Is there an option for
raco pollen publishto ignore unchanged files, or to preserve their attributes?
If not, where should I look in the Pollen source code if I wanted to implement this feature?
Preserving the modification times during the publish operation might simply be a matter of adding a third optional
#targument to the call to
copy-directory/filesin this line of
command.rkt. (See docs for
Minor point: I doubt that
rsyncis actually uploading the whole file. Rsync by default checksums any files it thinks are modified and only uploads the chunks that have actually changed. I would guess that what you are seeing as an upload is probably just
rsyncupdating the modified-timestamp on the remote copy (more info). Still, I get that it’s nice not to see noise from updating files that haven't changed.
@otherjoel Thanks for the information.
Yes. Maybe I was misinterpreting the output of rsync's
The current default behavior seems best, because that way, all the files that result from
raco pollen publishare treated uniformly.
I’d be open to adding this as a flag option for
raco pollen publish. But I’d have to be persuaded that there’s a practical benefit. What @otherjoel says about
I'm afraid I cannot provide more arguments to support my case.
I agree that my problem is more of a "cosmetic" nature, so I understand that it is not worth the effort.