Open wizioo opened 10 years ago
Hi @wizioo. Thanks for bringing this to my attention.
As I'm not based on a windows platform I'd really appreciate it if you were able to raise a pull request (into the develop
branch) detailing these changes.
I can then easily inspect the diff and see if it's possible to provide a mechanism to allow the tool to be more configurable to function across multiple environments without the need to amend the core script.
Would that be possible?
Hello @getdave. Thanks for your interest in my idea. I'll try to do it this week for sure.
@wizioo Thanks for this, saved me a lot of time on Win7!
Also, +1 for Windows support. :)
If using sed for search/replace, does it handle data in serialised arrays?
I'm thinking WordPress databases for example, which use serialised arrays.
@davemac No I don't think sed
will handle that. As far as I"m aware the only tool that does is the SearchReplaceDB PHP script I'm using on the advanced search replace branch of this repo.
If there's a node module that can handle this then that would be greatly preferable.
@davemac Yeah, it doesn't work on serialised arrays... Any solution?
Have a look at @webrain solution : https://github.com/webrain/grunt-wordpress-deploy Their search / replace function handle serialised arrays. Maybe we should use it to solve the problem.
@wizioo The @webrain solution is a fork of my original. It would have been nice if they had contributed to my script rather than duplicate and rewrite but I understand if they prefer to work on their own solution. It's all open source after all! :)
I like the serialisation of arrays in their script. I suggest that we consider "borrowing" the serialization code and add a credit in a "history" section as they have on their script when referencing.
Any thoughts?
I have a Windows 8.1 with Wamp locally and I work with a remote linux platform. Your grunt plugin is fantastic but it didn't worked for me until I made some changes which can interest you.
To make it work on Win platform, there is 2 problem:
Sed doesn't work on Windows platform. As shelljs is a dependencie, you can use:
to replace:
in db_replace function and you don't need search_replace template either.
Problem w/ command backslashes in db_dump function
I just had to remove it (
\\
) to make it work for me. If not, mysql_dump is not launched. I don't know if it's crucial for other platforms.