versions() added perl, python, gcc
This commit is contained in:
parent
a9a9b3ae88
commit
1cd53f248b
@ -100,6 +100,7 @@ Other changes
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
|
| 3.53.0 | 2018-12-29 | `versions()` added perl, python, gcc |
|
||||||
| 3.52.7 | 2018-12-29 | `versions()` bug fix macOS detection |
|
| 3.52.7 | 2018-12-29 | `versions()` bug fix macOS detection |
|
||||||
| 3.52.6 | 2018-12-28 | `versions()` bug fix macOS |
|
| 3.52.6 | 2018-12-28 | `versions()` bug fix macOS |
|
||||||
| 3.52.5 | 2018-12-28 | preparing automated tests, travis-ci integration, added dev-dependencies |
|
| 3.52.5 | 2018-12-28 | preparing automated tests, travis-ci integration, added dev-dependencies |
|
||||||
|
|||||||
@ -299,11 +299,14 @@ function versions(callback) {
|
|||||||
php: '',
|
php: '',
|
||||||
docker: '',
|
docker: '',
|
||||||
postfix: '',
|
postfix: '',
|
||||||
postgresql: ''
|
postgresql: '',
|
||||||
|
perl: '',
|
||||||
|
python: '',
|
||||||
|
gcc: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
let functionProcessed = (function () {
|
let functionProcessed = (function () {
|
||||||
let totalFunctions = 16;
|
let totalFunctions = 19;
|
||||||
return function () {
|
return function () {
|
||||||
if (--totalFunctions === 0) {
|
if (--totalFunctions === 0) {
|
||||||
if (callback) {
|
if (callback) {
|
||||||
@ -477,6 +480,31 @@ function versions(callback) {
|
|||||||
functionProcessed();
|
functionProcessed();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
exec('perl -v', function (error, stdout) {
|
||||||
|
if (!error) {
|
||||||
|
const perl = stdout.toString().split('\n') || '';
|
||||||
|
while (perl.length > 0 && perl[0].trim() === '') {
|
||||||
|
perl.shift();
|
||||||
|
}
|
||||||
|
if (perl.length > 0) {
|
||||||
|
result.perl = perl[0].split('(').pop().split(')')[0].replace('v', '');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
functionProcessed();
|
||||||
|
});
|
||||||
|
exec('python -V 2>&1', function (error, stdout) {
|
||||||
|
if (!error) {
|
||||||
|
const python = stdout.toString().split('\n')[0] || '';
|
||||||
|
result.python = python.toLowerCase().replace('python', '').trim();
|
||||||
|
}
|
||||||
|
functionProcessed();
|
||||||
|
});
|
||||||
|
exec('gcc -dumpversion', function (error, stdout) {
|
||||||
|
if (!error) {
|
||||||
|
result.gcc = stdout.toString().split('\n')[0].trim() || '';
|
||||||
|
}
|
||||||
|
functionProcessed();
|
||||||
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (callback) { callback(result); }
|
if (callback) { callback(result); }
|
||||||
resolve(result);
|
resolve(result);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user