Rewrite update script in python.
This commit is contained in:
		
					parent
					
						
							
								6bb3f1bba8
							
						
					
				
			
			
				commit
				
					
						3cc304cbe5
					
				
			
		
					 3 changed files with 36 additions and 16 deletions
				
			
		|  | @ -52,8 +52,8 @@ def bootstrap_brightray(url): | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def update_atom_shell(): | def update_atom_shell(): | ||||||
|   update = os.path.join(SOURCE_ROOT, 'script', 'update') |   update = os.path.join(SOURCE_ROOT, 'script', 'update.py') | ||||||
|   subprocess.check_call([update]) |   subprocess.check_call([sys.executable, update]) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| if __name__ == '__main__': | if __name__ == '__main__': | ||||||
|  |  | ||||||
|  | @ -1,14 +0,0 @@ | ||||||
| #!/bin/sh |  | ||||||
| 
 |  | ||||||
| set -e |  | ||||||
| 
 |  | ||||||
| cd "$(dirname "$0")/.." |  | ||||||
| 
 |  | ||||||
| ./script/update-frameworks.py |  | ||||||
| ./script/update-node.py --version v0.10.12 |  | ||||||
| 
 |  | ||||||
| gyp -f ninja --depth . atom.gyp \ |  | ||||||
|   -Icommon.gypi \ |  | ||||||
|   -Ivendor/brightray/brightray.gypi \ |  | ||||||
|   -Dtarget_arch=ia32 \ |  | ||||||
|   -Dlibrary=static_library |  | ||||||
							
								
								
									
										34
									
								
								script/update.py
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										34
									
								
								script/update.py
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,34 @@ | ||||||
|  | #!/usr/bin/env python | ||||||
|  | 
 | ||||||
|  | import subprocess | ||||||
|  | import sys | ||||||
|  | 
 | ||||||
|  | from lib.util import * | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__)) | ||||||
|  | NODE_VERSION = 'v0.10.12' | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | def main(): | ||||||
|  |   os.chdir(SOURCE_ROOT) | ||||||
|  | 
 | ||||||
|  |   update_frameworks_and_node(NODE_VERSION) | ||||||
|  |   update_gyp() | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | def update_frameworks_and_node(version): | ||||||
|  |   uf = os.path.join(SOURCE_ROOT, 'script', 'update-frameworks.py') | ||||||
|  |   un = os.path.join(SOURCE_ROOT, 'script', 'update-node.py') | ||||||
|  |   subprocess.check_call([sys.executable, uf]) | ||||||
|  |   subprocess.check_call([sys.executable, un, '--version', version]) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | def update_gyp(): | ||||||
|  |   subprocess.check_call(['gyp', '-f', 'ninja', '--depth', '.', 'atom.gyp', | ||||||
|  |                          '-Icommon.gypi', '-Ivendor/brightray/brightray.gypi', | ||||||
|  |                          '-Dtarget_arch=ia32', '-Dlibrary=static_library']) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | if __name__ == '__main__': | ||||||
|  |   sys.exit(main()) | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Cheng Zhao
				Cheng Zhao