Update node before running npm.
This commit is contained in:
parent
55034be104
commit
192216ea64
4 changed files with 16 additions and 9 deletions
|
@ -7,29 +7,25 @@ from lib.util import *
|
|||
|
||||
|
||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
NODE_VERSION = 'v0.10.15'
|
||||
|
||||
|
||||
def main():
|
||||
os.chdir(SOURCE_ROOT)
|
||||
|
||||
update_frameworks_and_node(NODE_VERSION)
|
||||
update_frameworks()
|
||||
update_gyp()
|
||||
|
||||
|
||||
def update_frameworks_and_node(version):
|
||||
if sys.platform == 'darwin':
|
||||
def update_frameworks():
|
||||
if sys.platform is 'darwin':
|
||||
uf = os.path.join('script', 'update-frameworks.py')
|
||||
subprocess.check_call([sys.executable, uf])
|
||||
|
||||
un = os.path.join('script', 'update-node.py')
|
||||
subprocess.check_call([sys.executable, un, '--version', version])
|
||||
|
||||
|
||||
def update_gyp():
|
||||
gyp = os.path.join('vendor', 'gyp', 'gyp_main.py')
|
||||
python = sys.executable
|
||||
if sys.platform == 'cygwin':
|
||||
if sys.platform is 'cygwin':
|
||||
python = os.path.join('vendor', 'python_26', 'python.exe')
|
||||
subprocess.call([python, gyp,
|
||||
'-f', 'ninja', '--depth', '.', 'atom.gyp',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue