Robert-W / grunt-ftp-push

Deploy files to an FTP server as part of your Grunt workflow.
MIT License
39 stars 14 forks source link

Wipe and/or Sync Feature #12

Open Robert-W opened 10 years ago

Robert-W commented 10 years ago

Add a feature to wipe the destination directory that the files will be pushed into and/or a feature to do a proper sync between the working directory and the destination directory.

pyrsmk commented 9 years ago

Or even delete only one file would be really awesome ;)

Robert-W commented 9 years ago

Thanks @pyrsmk, I will make sure when I get this added in to have that option. This was supposed to be implemented a little while ago but I am currently working full time and going to school part time so I have not had a chance to finish implementing this. Im hoping to add it in soon or worst case when my semester is over in mid december (I am taking some required classes that are just eating up my free time with ridiculous amounts of projects). I apologize for the delays on getting this updated.

pyrsmk commented 9 years ago

Don't apologize, we all have a life ;)

Robert-W commented 9 years ago

lol thanks, I appreciate the patience.

franzliedke commented 9 years ago

This library works really well for me, good job! This feature, however, would make it perfect. =)

Robert-W commented 9 years ago

Thanks @franzliedke, Its definitely something I'm looking into, I have been so caught up in other projects I have not had a chance to get some more updates out for this but there will hopefully be some in the next month.

franzliedke commented 9 years ago

I might be able to hack together a pull request. What would you want this to look like?

My proposal:

Robert-W commented 9 years ago

Yea that sounds good to me, I will probably to put a big use at your own risk warning in the docs letting people know to make sure its configured right before they wipe themselves out lol but what you have listed looks good

almilo commented 9 years ago

Hi there,

I have implemented a pull-request with recursive directory removal: https://github.com/Robert-W/grunt-ftp-push/pull/31

cheers, Alberto

andrewmcwatters commented 9 years ago

+1, would like to see this soon. Just started using grunt-ftp-push, and it's pretty great!

Robert-W commented 9 years ago

Hey Guys, I will take a look at getting this added in, looked at the pull request and this looks pretty good. Im preparing to release a new version which is a major rewrite that has testing and several other minor optimizations and fixes in it. I think I will try to get this in to that version and released as soon as possible.

almilo commented 9 years ago

Hi Robert, Good to hear! Many thanks once again and looking forward to the next release :)

adammeyer commented 8 years ago

+1

flowdee commented 7 years ago

Would be great to get this soon 👍 @Robert-W

Robert-W commented 7 years ago

@flowdee Hey, there was a PR up for this but the original publisher of that never updated his PR to add tests so it was eventually closed due to inactivity. I may see if I can revisit and pull out the relevant code from it to get this added in. However, it may not be until closer to or right after the holidays before I can get to it. If you need it sooner and are able to contribute I would love the help, but if not, I will try to get to it as soon as possible.

The previous PR is here, it has some comments on the actual lines changed. Since then, the codebase has been updated and now has a cache option to only push changes versus the whole repo. His concept was pretty simple, wipe the target directory and then push everything (with the new code, it would also need to reset the cache). The first release will probably only focus on that and then if people really need to sync from their server to local, I may consider that, but that seems like a much less useful feature than doing local to server.

andrewmcwatters commented 7 years ago

This took so long to implement, it's almost completely irrelevant for me now, since it's entirely out of my workflow.

In the future, please focus on making things work rather than contributor "correctness" in a small project.

Robert-W commented 7 years ago

@andrewmcwatters Sorry for the delays, but a feature like wiping/syncing an entire remote directory could easily go horribly wrong and is not something I would be willing to deploy without tests in place to validate that it works exactly as configured. If this isn't completely correct and someone wipes their entire ftp server because of a bug or a use case that was not tested for, that could be catastrophic. All I ask is that contributors write test cases for their PR's so I can deploy without having to worry about putting people's data and projects at risk.

Unfortunately at that time, I had too many things going on and did not have time to go through and write all the test cases myself.

For the future I will try to push out new features faster but having tests for something like wiping/syncing directories is something that I will always require on PR's regardless of project size (I can forego linting and code style issues as long as there are passing unit tests).