From: Cheng Zhao Date: Tue, 20 Jan 2015 22:39:14 +0000 (-0800) Subject: Add script to dump information for atom-shell X-Git-Tag: v0.20.8~8^2~6 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=5d9b538513802964d5313ffe27336cab3b7471b7;p=electron.git Add script to dump information for atom-shell --- diff --git a/script/dump_info.js b/script/dump_info.js new file mode 100644 index 00000000..c95dd736 --- /dev/null +++ b/script/dump_info.js @@ -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); +});