-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.js
41 lines (30 loc) · 864 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* jshint node: true */
'use strict';
var BasePlugin = require('ember-cli-deploy-plugin');
var passwdUser = require('passwd-user');
var FrontEndBuildsNotifier = require('./lib/front-end-builds-notifier');
module.exports = {
name: 'ember-cli-deploy-front-end-builds',
createDeployPlugin: function(options) {
var homedir = passwdUser.sync(process.getuid()).homedir;
var DeployPlugin = BasePlugin.extend({
name: options.name,
defaultConfig: {
privateKey: homedir + '/.ssh/id_rsa',
requestOptions: {}
},
requiredConfig: [
'app',
'endpoint'
],
didUpload: function(context) {
var notifier = new FrontEndBuildsNotifier({
plugin: this,
context: context
});
return notifier.notify();
}
});
return new DeployPlugin();
}
};