summaryrefslogtreecommitdiffstats
path: root/tasks/config.js
blob: 4c53fd624d25f5b355f1e49e635c0c94ffcdab1a (plain)
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
var args = require('yargs').argv;
var fs = require('fs');

var userhome = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE;

module.exports = {
  components: ['vaadin-grid'],
  version: args.version || 'master',
  permalink: args.version ? 'latest' : '',
  cdnHost: args.cdnHostname || 'cdn.vaadin.com',
  zipHost: args.zipHostname || 'vaadin.com',
  paths: {
    staging: {
      bower: 'target/bower',
      cdn: 'target/cdn',
      zip: 'target/zip',
      doc: 'target/docsite'
    },
    userhome: userhome,
    privateKey: function() {
      try {
        return fs.readFileSync(userhome + '/.ssh/id_rsa');
      } catch(error) {
        return fs.readFileSync(userhome + '/.ssh/id_dsa');
      }
    }
  }
};