]> khamidou — GitHub mirrors - electron.git/commitdiff
Add script to dump information for atom-shell
authorCheng Zhao <zcbenz@gmail.com>
Tue, 20 Jan 2015 22:39:14 +0000 (14:39 -0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 20 Jan 2015 22:39:14 +0000 (14:39 -0800)
script/dump_info.js [new file with mode: 0644]

diff --git a/script/dump_info.js b/script/dump_info.js
new file mode 100644 (file)
index 0000000..c95dd73
--- /dev/null
@@ -0,0 +1,39 @@
+var app = require('app');
+
+function getDate() {
+  var today = new Date();
+  var year = today.getFullYear();
+  var month = today.getMonth() + 1;
+  if (month <= 9)
+    month = '0' + month;
+  var day= today.getDate();
+  if (day <= 9)
+    day = '0' + day;
+  return year + '-' + month + '-' + day;
+}
+
+app.on('ready', function() {
+  var json = {};
+  json.version = process.versions['atom-shell'];
+  json.date = getDate();
+
+  var names = ['v8', 'uv', 'zlib', 'openssl', 'modules', 'chrome']
+  for (var i in names) {
+    var name = names[i];
+    json[name] = process.versions[name];
+  }
+
+  json.files = [
+    'darwin-x64',
+    'darwin-x64-symbols',
+    'linux-ia32',
+    'linux-ia32-symbols',
+    'linux-x64',
+    'linux-x64-symbols',
+    'win32-ia32',
+    'win32-ia32-symbols',
+  ];
+
+  console.log(json);
+  process.exit(0);
+});