ftp-deploy icon indicating copy to clipboard operation
ftp-deploy copied to clipboard

[wip] Upload newer

Open simonh1000 opened this issue 6 years ago • 4 comments
trafficstars

closes #42

simonh1000 avatar Nov 03 '19 10:11 simonh1000

Hi @simonh1000,

I see you have added the check based on the size and date attribute. Some things that pops into my head is that most files in my repository are the dependencies like ./vendor/ and/or ./node_modules/. Those get installed every pipeline instead, so the date is always newer while almost never updated.

Could the system maybe create a file with all the uploaded files with the hash of the file. Something like this: ftp-deploy.hashes.txt:

index.html 987c50702b529aedb22b1b3fc532c0cd
node_modules/axios/index.js 949ab1b710cce8d96c47a5e7a4655b02

Then the only thing that needs to be done is get the file and check the hashes locally or in CI/CD process and upload only different files. Maybe size would benefit because of speed, so only check the hash if the size is different.

This will also make a rollback easier

erwineverts avatar Nov 19 '19 20:11 erwineverts

I certainly share your use case - I end up re-uploading a bunch of assets that are copied over with each build as that's also creating a new copy. In my case, maybe some tweaking of webpack to make it more sophisticated might be enough, but I can see that that will not help if you have to use the output of CI.

I'm not sure how I feel about leaving a file on someone's server though. Need to think about that and would welcome others' views

simonh1000 avatar Nov 20 '19 18:11 simonh1000

Hi @simonh1000, I was wondering if there is any progress since in this PR and its conflicts as I would be interested in using this new feature :-)

drikusroor avatar Apr 27 '20 13:04 drikusroor

Hi @erwineverts and @drikusroor - if still interested maybe checkout PR https://github.com/simonh1000/ftp-deploy/pull/117 - it will use a generated hash-sum file.

TomFreudenberg avatar Feb 28 '21 19:02 TomFreudenberg