diff options
Diffstat (limited to 'tasks/common.js')
-rw-r--r-- | tasks/common.js | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tasks/common.js b/tasks/common.js deleted file mode 100644 index dd22520..0000000 --- a/tasks/common.js +++ /dev/null @@ -1,26 +0,0 @@ -var args = require('yargs').argv; -var _ = require('lodash'); -var gutil = require('gulp-util'); -var config = require('./config'); - -function checkArguments(arguments) { - _.forEach(arguments, function(a) { - if(!args.hasOwnProperty(a)) { - throw Error('Required argument \'--'+ a +'\' is missing.'); - } - }); -} - -function ssh(user, host, command, done) { - gutil.log('SSH: ' + host + ' -> ' + command); - require('node-ssh-exec')({ - host: host, - username: user, - privateKey: config.paths.privateKey() - }, command, done); -} - -module.exports = { - ssh: ssh, - checkArguments: checkArguments -}; |