-
Notifications
You must be signed in to change notification settings - Fork 9
/
global-vars.js
20 lines (19 loc) Β· 1.09 KB
/
global-vars.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const path = require('path');
const boxes = path.join(require('os').homedir(), '.baker');
const bakerForMacPath = process.platform === 'darwin' ? path.join(require('os').homedir(), 'Library', 'Baker', 'BakerForMac') : undefined;
const bakerSSHConfig = process.platform === 'darwin' ? {port: 6022, user: 'root', private_key: path.join(bakerForMacPath, 'baker_rsa'), hostname: 'localhost'} :
{port: 6022, user: 'root', private_key: path.join(boxes, 'baker_rsa'), hostname: 'localhost'};
const privateKey = process.platform === 'darwin' ? path.join(bakerForMacPath, 'baker_rsa') : path.join(boxes, 'baker_rsa');
module.exports = {
boxes : boxes,
ansible : path.join(boxes, 'ansible-srv'),
configPath : path.join(__dirname, './config'),
bakeletsPath: path.join(__dirname, './lib/bakelets'),
remotesPath : path.join(__dirname, './remotes'),
envIndexPath: path.join(boxes, 'data', 'index.json'),
bakerForMacPath,
bakerSSHConfig,
privateKey,
// spinnerDot : 'dots'
version: require('./package.json').version
};