Created
February 18, 2014 00:08
-
-
Save aaronpowell/9061899 to your computer and use it in GitHub Desktop.
TFS PowerTools undo unchanged files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tfptPath = 'C:\\Program Files (x86)\\Microsoft Team Foundation Server 2013 Power Tools\\TFPT.EXE'; | |
grunt.registerTask('tfpt-uu', 'Undo changes to unchanged files in the workspace (required TFs PowerTools 2013', function () { | |
var fs = require('fs'); | |
var cb = this.async(); | |
fs.exists(tfptPath, function (exists) { | |
if (!exists) { | |
grunt.warn('TFS Power Tools are not installed, aborting...'); | |
cb(); | |
return; | |
} | |
var child = grunt.util.spawn({ | |
cmd: tfptPath, | |
args: ['uu', '/recursive'] | |
}, function (err, result, code) { | |
if (err) { | |
grunt.fatal(err); | |
} | |
cb(); | |
}); | |
child.stdout.pipe(process.stdout); | |
child.stderr.pipe(process.stderr); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment