Commit 41279ebe62bb46a21469b2cd11bf2c04113dba85

Authored by Adhidarma Hadiwinoto
1 parent 1b7b86ce72
Exists in master

Process and parent id on matrix

Showing 1 changed file with 2 additions and 0 deletions Inline Diff

1 require('pkginfo')(module, 'version'); 1 require('pkginfo')(module, 'version');
2 const simpleGit = require('simple-git'); 2 const simpleGit = require('simple-git');
3 const machineid = require('node-machine-id'); 3 const machineid = require('node-machine-id');
4 4
5 const matrix = { 5 const matrix = {
6 machineid: machineid.machineIdSync(), 6 machineid: machineid.machineIdSync(),
7 machineid_readable: null, 7 machineid_readable: null,
8 komodosdk_type: 'nodejs', 8 komodosdk_type: 'nodejs',
9 komodosdk_version: module.exports.version, 9 komodosdk_version: module.exports.version,
10 pid: process.pid,
11 ppid: process.ppid,
10 }; 12 };
11 13
12 matrix.machineid_readable = matrix.machineid.match(/.{1,4}/g).join('-'); 14 matrix.machineid_readable = matrix.machineid.match(/.{1,4}/g).join('-');
13 15
14 // get active git version 16 // get active git version
15 simpleGit(process.cwd()).raw( 17 simpleGit(process.cwd()).raw(
16 ['describe'], 18 ['describe'],
17 (err, result) => { 19 (err, result) => {
18 if (!err) { 20 if (!err) {
19 matrix.version_active = (result || '').trim() || null; 21 matrix.version_active = (result || '').trim() || null;
20 } 22 }
21 }, 23 },
22 ); 24 );
23 25
24 module.exports = matrix; 26 module.exports = matrix;
25 27