-
Notifications
You must be signed in to change notification settings - Fork 34
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
Support for windows platform #42
base: develop
Are you sure you want to change the base?
Conversation
…atform - Also remove search_replace template as it is now unuses - dBReplace() function now return shell and not cmd anymore. Unit test will change as shell.sed returns the new string after replacement (But I'm not at ease w/ unit testing so I'll let this part to another).
- I don't know if it still work on other platforms
@wizioo thanks for this pull request. It is very much appreciated. I will review just as soon as I can. |
@nickbouton I can't confirm this I'm afraid as I don't have a windows machine. Sorry about that. Maybe @wizioo can help you there? Just so you're both aware my plan for ongoing development to counter this issue would be to provide a option in the grunt task config which allows the user to supply their own search/replace mechanism. This would allow Windows users to create and test their own search/replace without me needing to buy and test on the windows machine. I also feel such an approach would be the most extendible. Any thoughts? |
@nickbouton You're right... sed command only replace the 1st instance of the url. PS: Sorry for not having answered before, I didn't have time. |
@wizioo Maybe using powershell instead? Not sure offhand. http://stackoverflow.com/questions/60034/how-can-you-find-and-replace-text-in-a-file-using-the-windows-command-line-envir Might be some way of getting it to work via |
@nickbouton I think I've got it! Just use it in db_replace instead of sed command:
I'll do a pull request w/ this feature as soon as possible. |
Hi there, @nickbouton Can you test it and confirm ? @getdave I hope it will be included on your next release. Thanks for the work already done. |
Thanks for your work on this, @wizioo. I will test it out this evening and get back to you. |
Guys if this is just to do with relying on the use of https://github.com/getdave/grunt-deployments/tree/feature/advanced-search-replace More here |
As you askes me, here's my version working on windows.
I was a little surprised by the develop branch having a totally different structure from master where I originally changed the code.
I have 2 points I'd want you to see:
dbDump
. I don't know if it still works on Linux without backslashes in cmddbReplace()
as there's no more cmd to return. Now I use shelljs sed command... so I thought you could return shell but I don't know what to do with unit testing.I hope my contribution is useful and usable for you (and others).
However, thank you for this fantastic grunt plugin!