]> khamidou — GitHub mirrors - electron.git/commitdiff
Create dist for chromedriver and upload it.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 12 Sep 2014 14:10:06 +0000 (22:10 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 12 Sep 2014 14:10:06 +0000 (22:10 +0800)
script/create-dist.py
script/upload.py

index 5188fbfdf86891abb38fb90a268e258cb8f89d8a..3a6fc145371e9d6059e7b64c9d4f0a4930bdc49c 100755 (executable)
@@ -104,6 +104,7 @@ def main():
   download_libchromiumcontent_symbols(args.url)
   create_symbols()
   copy_binaries()
+  copy_chromedriver()
   copy_headers()
   copy_license()
 
@@ -112,6 +113,7 @@ def main():
 
   create_version()
   create_dist_zip()
+  create_chromedriver_zip()
   create_symbols_zip()
   create_header_tarball()
 
@@ -142,6 +144,11 @@ def copy_binaries():
                     symlinks=True)
 
 
+def copy_chromedriver():
+  build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
+  execute([sys.executable, build, '-c', 'Release', '-t', 'copy_chromedriver'])
+
+
 def copy_headers():
   os.mkdir(DIST_HEADERS_DIR)
   # Copy standard node headers from node. repository.
@@ -232,6 +239,20 @@ def create_dist_zip():
     make_zip(zip_file, files, dirs)
 
 
+def create_chromedriver_zip():
+  dist_name = 'chromedriver-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
+                                                    TARGET_PLATFORM, DIST_ARCH)
+  zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
+
+  with scoped_cwd(DIST_DIR):
+    files = ['LICENSE']
+    if TARGET_PLATFORM == 'win32':
+      files += ['chromedriver.exe']
+    else:
+      files += ['chromedriver']
+    make_zip(zip_file, files, [])
+
+
 def create_symbols_zip():
   dist_name = 'atom-shell-{0}-{1}-{2}-symbols.zip'.format(ATOM_SHELL_VERSION,
                                                           TARGET_PLATFORM,
index c7480b939a51a89ef9a60f0e03b4029651a8466d..230648a267648a0bbdae50cb50ae0618b56853fa 100755 (executable)
@@ -26,6 +26,9 @@ DIST_NAME = 'atom-shell-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
 SYMBOLS_NAME = 'atom-shell-{0}-{1}-{2}-symbols.zip'.format(ATOM_SHELL_VERSION,
                                                            TARGET_PLATFORM,
                                                            DIST_ARCH)
+CHROMEDRIVER_NAME = 'chromedriver-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
+                                                          TARGET_PLATFORM,
+                                                          DIST_ARCH)
 
 
 def main():
@@ -48,6 +51,8 @@ def main():
   release_id = create_or_get_release_draft(github, args.version)
   upload_atom_shell(github, release_id, os.path.join(DIST_DIR, DIST_NAME))
   upload_atom_shell(github, release_id, os.path.join(DIST_DIR, SYMBOLS_NAME))
+  upload_atom_shell(github, release_id,
+                    os.path.join(DIST_DIR, CHROMEDRIVER_NAME))
 
   # Upload node's headers to S3.
   bucket, access_key, secret_key = s3_config()