Log node and npm versions

This commit is contained in:
Kevin Sawicki 2016-04-07 10:03:16 -07:00
parent e95224deab
commit 687a512b11

View file

@ -59,6 +59,8 @@ def main():
npm = 'npm.cmd' if PLATFORM == 'win32' else 'npm' npm = 'npm.cmd' if PLATFORM == 'win32' else 'npm'
execute([npm, 'install', 'npm@2.12.1']) execute([npm, 'install', 'npm@2.12.1'])
log_versions()
is_release = os.environ.has_key('ELECTRON_RELEASE') is_release = os.environ.has_key('ELECTRON_RELEASE')
args = ['--target_arch=' + target_arch] args = ['--target_arch=' + target_arch]
if not is_release: if not is_release:
@ -89,13 +91,21 @@ def run_script(script, args=[]):
subprocess.check_call([sys.executable, script] + args) subprocess.check_call([sys.executable, script] + args)
def log_versions():
sys.stderr.write('\nnode --version\n')
sys.stderr.flush()
subprocess.call(["node", "--version"])
sys.stderr.write('\nnpm --version\n')
sys.stderr.flush()
subprocess.call(["npm", "--version"])
def setup_nodenv(): def setup_nodenv():
if os.path.isdir('/usr/local/share/nodenv'): if os.path.isdir('/usr/local/share/nodenv'):
os.environ['NODENV_ROOT'] = '/usr/local/share/nodenv' os.environ['NODENV_ROOT'] = '/usr/local/share/nodenv'
os.environ['PATH'] = '/usr/local/share/nodenv/bin:/usr/local/share/nodenv/shims:' + os.environ['PATH'] os.environ['PATH'] = '/usr/local/share/nodenv/bin:/usr/local/share/nodenv/shims:' + os.environ['PATH']
os.environ['NODENV_VERSION'] = 'v0.10.21' os.environ['NODENV_VERSION'] = 'v0.10.21'
print('configured nodenv')
subprocess.call(["node", "--version"])
if __name__ == '__main__': if __name__ == '__main__':