evanplaice/node-ftpsync

Not syncing important files because filesize is the same

Twansparant opened this issue · 2 comments

Hi there,

I really like this plugin because it only syncs the necessary files to my production server.
However I'm running into an issue which is quit a common workflow in my opinion;

When I'm done testing locally I run my npm run upload:production task in webpack, which first runs npm run build and after that my ftpsync task. During the build task, my assets get recompiled into my dist folder with new hashtags in the filenames. These new filenames are saved in a assets.json file in the dist folder.

Based on this assets.json file, the correct stylesheet and javascript files etc are enqueued on my front-end. This all works great, accept since this assets.json file doesn't change in filesize, it doesn't get synced to the server, resulting in a broken front-end...

My question, should I be looking at a different ftp app or is there someway I can trick node-ftpsync to always upload this assets.json file?

Thanks a lot!

This project seems to have been abandoned by the owner... but maybe it's not too late for me to respond.

I have a pull request (#39) that might fix your issue.

I was running into the same issue. The file size checking doesn't quite work in this case. I've added a check on the date-time. This way, changed files get uploaded.

@jppellerin The project hasn't been abandoned. I have just been preoccupied with other work. I'll review the PR