Skip to content
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

[wip] Upload newer #100

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

[wip] Upload newer #100

wants to merge 6 commits into from

Conversation

simonh1000
Copy link
Owner

@simonh1000 simonh1000 commented Nov 3, 2019

closes #42

@erwineverts
Copy link

erwineverts commented Nov 19, 2019

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

@simonh1000
Copy link
Owner Author

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

@drikusroor
Copy link

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 :-)

@TomFreudenberg
Copy link

Hi @erwineverts and @drikusroor - if still interested maybe checkout PR #117 - it will use a generated hash-sum file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to update only newer file?
4 participants