grunt-fhc
Version:
Deploy your FeedHenry apps from Grunt.
32 lines (23 loc) • 624 B
JavaScript
;
var grunt = require('grunt');
var shell = require('shelljs');
module.exports = function (task, done) {
var options = task.options({
appid: '',
live: false
});
var cmd = ['fhc restart'];
if(options.appid === '') {
grunt.log.warn('You must specify an App ID');
return false;
}
cmd.push(options.appid);
if(options.live) {
cmd.push('--live');
}
grunt.log.ok('Restarting App.');
shell.exec(cmd.join(' '),{silent:true});
grunt.log.ok('App restarted.');
done();
};
module.exports.description = 'Restart a FeedHenry App';