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

Add beyondcompare 4 support #31

Closed
jamesrcounts opened this issue Dec 2, 2015 · 6 comments
Closed

Add beyondcompare 4 support #31

jamesrcounts opened this issue Dec 2, 2015 · 6 comments
Labels

Comments

@jamesrcounts
Copy link

I can add a beyond compare 4 reporter, this is just a reminder for myself

@staxmanade
Copy link
Member

Is beyond compare 4 different than what this supports https://github.com/approvals/Approvals.NodeJS/blob/master/lib/Reporting/Reporters/beyondcompareReporter.js? ... ba never-mind just read the code and it's only Beyond Compare 3..

NOTE: if you can think of a way to make it less version dependent, that would be awesome.

@jamesrcounts
Copy link
Author

I had trouble getting npm install to complete on Windows 10. So I've been stalled on this. But here is a "custom" reporter that is working for us for now.

           {
               // this is used in exception reporting etc. Just give it a name :)
               name: "BeyondCompare4",

                     // This is used to determine if the reporter can report on the specified file
                     // EX: an image differ vs a txt differ...
               canReportOn: function(receivedFilePath) {
                   return receivedFilePath.endsWith(".txt");
               },

                     // Actually execute the diff against the two files
               report: function(approved, received) {
                   if (!fs.existsSync(approved)) {
                       fs.writeFileSync(approved, "");
                   }

                   var exe = "C:/Program Files/Beyond Compare 4/BCompare.exe";

                   console.log('CMD: ' + [exe, received, approved].join(' '));

                   child_process.spawn(exe, [received, approved], {
                       detached: true,
                       stdio: ['pipe', 1, 2, 'ipc']
                   });
               }
           }

@MiguelMadero
Copy link

FYI, it works for me on mac

@staxmanade
Copy link
Member

I've updated beyond compare reporter to try to do a little extra path searching... https://github.com/approvals/Approvals.NodeJS/blob/master/lib/Reporting/Reporters/beyondcompareReporter.js

NOTE: I don't have this tool - so here's 🤞 that it still works (and improves on the old one)

@staxmanade
Copy link
Member

new term 🤞 DD crossed finger driven development

@MiguelMadero
Copy link

🤞 DD

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

No branches or pull requests

3 participants