hoffi / gulp-msbuild

gulp-msbuild has moved to https://github.com/fluffynuts/gulp-msbuild.
MIT License
53 stars 44 forks source link

Add Linux MSBuild detection #58

Closed dev-rowbot closed 7 years ago

dev-rowbot commented 7 years ago

This change adds support for MSBuild in Linux as opposed to defaulting to xbuild (which is soon to be deprecated)

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-1.2%) to 97.436% when pulling 183a7eccf41cb8056ba430c02d56fcc8ff994de2 on dev-rowbot:linuxMsbuildSupport into a549abc15849266756de03e0f144c17e67a60101 on hoffi:master.

dev-rowbot commented 7 years ago

I changed the ms build-finder test to expect msbuild to be available in Linux but technically xbuild OR msbuild are still acceptable. This is failing on the CI server due to msbuild not being found.

I'm not sure what the best approach would be in this situation.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-1.2%) to 97.452% when pulling 921969a1a5b07fb18e730ad2505dd6294b19aae3 on dev-rowbot:linuxMsbuildSupport into a549abc15849266756de03e0f144c17e67a60101 on hoffi:master.

hoffi commented 7 years ago

Hi, thanks!

You can simulate that the binary exists by using a stub on statSync like in line 126. Something like that:

var mock = this.sinon.mock(child_process);
mock.expects('spawnSync').withArgs('which', ['msbuild'], {encoding: 'utf8'}).returns({});
coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.5%) to 98.089% when pulling 760da2cb9af4cc3cbc14f3466c307457d0bcd801 on dev-rowbot:linuxMsbuildSupport into a549abc15849266756de03e0f144c17e67a60101 on hoffi:master.

dev-rowbot commented 7 years ago

@hoffi Thanks for the suggestion. I have added 2 tests for Linux: