.then(function checkExecs() { return forEachSeries([ { exec: 'ideviceinfo', msg: '`ideviceinfo` from the "libimobiledevice" package was not found in your PATH. It is required to query iOS devices. Mac OS X users may use https://github.com/benvium/libimobiledevice-macosx' }, { exec: 'adb', msg: '`adb` from the Android SDK was not found in your PATH. It is required to install and uninstall packages to/from Android devices.' } ], function(task) { return util.cmd('type ' + task.exec + ' >/dev/null').then( null, function() { grunt.log.error('WARNING: ' + task.msg); return true; } ); }); })
.then(function checkExecs() { return forEachSeries([ { exec: 'xcodebuild', msg: '`xcodebuild` from Xcode\'s "Command Line Tools" was not found in your PATH. It is required to build iOS packages.' }, { exec: 'xcrun', msg: '`xcrun` from Xcode\'s "Command Line Tools" was not found in your PATH. It is required to build iOS packages.' } ], function(task) { return _cmd('type ' + task.exec + ' >/dev/null').then( null, function() { grunt.log.error('WARNING: ' + task.msg); return true; } ); }); })
var _runCommands = function(tasks) { return forEachSeries(tasks, function(task) { grunt.log.write(task.msg); var promise = _cmd(task.cmd, task.cwd); var timer = setInterval(function() { grunt.log.notverbose.write('.'); }, 1000); return promise.then( function() { clearInterval(timer); grunt.log.ok(); }, function(err) { clearInterval(timer); grunt.log.error(); throw err; } ); }); };
.then(function checkExecs() { return forEachSeries([ { exec: 'android', msg: '`android` from the Android SDK was not found in your PATH. It may be required to build Android packages.' }, { exec: 'ant', msg: '`ant` (Apache Ant) was not found in your PATH. It is required to build Android packages.' } ], function(task) { return _cmd('type ' + task.exec + ' >/dev/null').then( null, function() { grunt.log.error('WARNING: ' + task.msg); return true; } ); }); })