Include apm version in index.json

This commit is contained in:
Cheng Zhao 2015-01-20 22:01:37 -08:00
parent 87cd762eb3
commit 62756a79df

View file

@ -1,5 +1,6 @@
var app = require('app');
var fs = require('fs');
var path = require('path');
var request = require('request');
var TARGET_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/index.json';
@ -16,10 +17,16 @@ function getDate() {
return year + '-' + month + '-' + day;
}
function getApmVersion() {
var package = require(path.resolve(__dirname, '..', 'package.json'));
return package.devDependencies['atom-package-manager'];
}
function getInfoForCurrentVersion() {
var json = {};
json.version = process.versions['atom-shell'];
json.date = getDate();
json.apm = getApmVersion();
var names = ['v8', 'uv', 'zlib', 'openssl', 'modules', 'chrome']
for (var i in names) {