]> khamidou — GitHub mirrors - electron.git/commitdiff
Only generate node.lib when we need to upload node headers.
authorCheng Zhao <zcbenz@gmail.com>
Sat, 31 Aug 2013 09:00:13 +0000 (17:00 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 31 Aug 2013 09:00:13 +0000 (17:00 +0800)
script/build.py
script/upload.py

index edce9e6cd9bb35167cf7d8c417804529802aba81..ce04c8621ec4350de45b62bc6ea02f9ae7660ca2 100755 (executable)
@@ -20,7 +20,7 @@ def main():
   args = parse_args()
   for config in args.configuration:
     build_path = os.path.join('out', config)
-    subprocess.call([ninja, '-C', build_path])
+    subprocess.call([ninja, '-C', build_path, args.target])
 
 
 def parse_args():
@@ -30,6 +30,10 @@ def parse_args():
                       nargs='+',
                       default=CONFIGURATIONS,
                       required=False)
+  parser.add_argument('-t', '--target',
+                      help='Build specified target',
+                      default='atom',
+                      required=False)
   return parser.parse_args()
 
 
index 7ff408c04dd4ecaa9e82618411a51825595586a6..fef3663e9d4b78e7c57889783ad5821426139e36 100755 (executable)
@@ -64,12 +64,17 @@ def dist_newer_than_head():
 def upload(bucket, access_key, secret_key, version=ATOM_SHELL_VRESION):
   os.chdir(DIST_DIR)
 
-  # s3put(bucket, access_key, secret_key, DIST_DIR,
-  #       'atom-shell/{0}'.format(version), [DIST_NAME])
+  s3put(bucket, access_key, secret_key, DIST_DIR,
+        'atom-shell/{0}'.format(version), [DIST_NAME])
   s3put(bucket, access_key, secret_key, DIST_DIR,
         'atom-shell/dist/{0}'.format(NODE_VERSION), glob.glob('node-*.tar.gz'))
 
   if TARGET_PLATFORM == 'win32':
+    # Generate the node.lib.
+    build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
+    subprocess.check_call([sys.executable, build, '-c', 'Release',
+                          '-t', 'generate_node_lib'])
+
     out_dir = os.path.join(SOURCE_ROOT, 'out', 'Release')
     node_lib = os.path.join(out_dir, 'node.lib')
     s3put(bucket, access_key, secret_key, out_dir,