Update node before running npm.
This commit is contained in:
		
					parent
					
						
							
								55034be104
							
						
					
				
			
			
				commit
				
					
						192216ea64
					
				
			
		
					 4 changed files with 16 additions and 9 deletions
				
			
		
							
								
								
									
										3
									
								
								.gitmodules
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitmodules
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -10,3 +10,6 @@
 | 
			
		|||
[submodule "vendor/depot_tools"]
 | 
			
		||||
	path = vendor/depot_tools
 | 
			
		||||
	url = https://chromium.googlesource.com/chromium/tools/depot_tools.git
 | 
			
		||||
[submodule "vendor/apm"]
 | 
			
		||||
	path = vendor/apm
 | 
			
		||||
	url = https://github.com/github/apm.git
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,6 +11,7 @@ from lib.util import *
 | 
			
		|||
 | 
			
		||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
 | 
			
		||||
VENDOR_DIR = os.path.join(SOURCE_ROOT, 'vendor')
 | 
			
		||||
NODE_VERSION = 'v0.10.15'
 | 
			
		||||
BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
 | 
			
		||||
PYTHON_26_URL = 'https://chromium.googlesource.com/chromium/deps/python_26'
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -21,9 +22,10 @@ def main():
 | 
			
		|||
  args = parse_args()
 | 
			
		||||
  if not args.skip_network:
 | 
			
		||||
    update_submodules()
 | 
			
		||||
    update_node()
 | 
			
		||||
    update_node_modules()
 | 
			
		||||
    bootstrap_brightray(args.url)
 | 
			
		||||
    if sys.platform == 'cygwin':
 | 
			
		||||
    if sys.platform is 'cygwin':
 | 
			
		||||
      update_win32_python()
 | 
			
		||||
 | 
			
		||||
  touch_config_gypi()
 | 
			
		||||
| 
						 | 
				
			
			@ -50,6 +52,11 @@ def update_submodules():
 | 
			
		|||
                         '--recursive'])
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def update_node():
 | 
			
		||||
  un = os.path.join('script', 'update-node.py')
 | 
			
		||||
  subprocess.check_call([sys.executable, un, '--version', NODE_VERSION])
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def bootstrap_brightray(url):
 | 
			
		||||
  bootstrap = os.path.join(VENDOR_DIR, 'brightray', 'script', 'bootstrap')
 | 
			
		||||
  subprocess.check_call([sys.executable, bootstrap, url])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1
									
								
								vendor/apm
									
										
									
									
										vendored
									
									
										Submodule
									
								
							
							
						
						
									
										1
									
								
								vendor/apm
									
										
									
									
										vendored
									
									
										Submodule
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
Subproject commit 1cda00c8507bad369b08a507907a7f96d27f022c
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue