Closed cschlosser closed 1 year ago
No, neither option worked. It still copies all files.
Maybe you could give it a try?
I tried the -e option as well and no luck.
Do you have any other idea?
Humm, a couple of things to consider perhaps. I notice that you did not use all the flags? There is an issue around the timezone that could also be a problem. There is an option of --ignore-time
which may help with that.
I used all the flags. The -R was there before already but maybe it needs to be in this order so I added it twice. Also added the ignore time option
Sorry, for the delay. Do I still use the -e
in the only_newer:
option?
The only_newer: true
results in -Rne --ignore-time
to be added to the string
I might be late to this post but I was looking at using drone to deploy php projects which do not require a build and only the changed files to be updated using FTP. This plugin fits the purpose if the only-newer flag works. by looking at the conversation above, I was just wondering how lftp detects which files are new or modified, maybe by the date-time?
upon reading the drone docs, drone creates a temporary directory and clones the repo which means all the files are always newly created in every build, so can this be the reason that lftp might be uploading all the files again?
Thanks for the suggestion @hussainb ,
Yes, lftp uses the timestamp of the files to detect what changed. A git clone keeps the timestamps correctly in sync with the remote repository. This is not the cause of the problem.
Didn't know that! Thanks!
If I can help to anyone with my experience, I was able to get this working using -Rn --ignore-time
The -e
was not helpful in my case, because in remote server there are generated file that I dont want to delete in each deploy
just tried this PR and I nearly collapsed as after uploading all the files it started with deleting of my whole FTP :D this PR ignored my PLUGIN_DEST_DIR
and used root. Or does "latest" use PLUGIN_DEST_DIR
while "only-newer" uses dest_dir
?
This branch is quite out of date. Did you merge it with master?
I only used .drone.yml
with cschlosser/drone-ftps:only-newer
.. would be really nice if it worked. Later I found out the FTP was nearly fully deleted but I had a backup so no data loss :)
The example configuration from the master
readme no longer matches this branch.
I may be able to take a look at this in the next few days but we had problems getting this to work reliably so I'm not too hopeful right now.
Should be included in #31, hopefully.
Add
only_newer
option.Use like this:
This should fix #12