ftp-deploy
ftp-deploy copied to clipboard
[wip] Upload newer
closes #42
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
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
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 :-)
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.