Hard code the chromedriver's version
authorCheng Zhao <zcbenz@gmail.com>
Wed, 8 Jul 2015 04:32:47 +0000 (12:32 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 8 Jul 2015 04:53:33 +0000 (12:53 +0800)
It is not possible to run chromedriver for all targets.

script/create-dist.py
script/lib/config.py
script/lib/util.py
script/upload.py

index 928430e..dbecc0a 100755 (executable)
@@ -8,9 +8,9 @@ import sys
 import stat
 
 from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \
-                       get_target_arch
+                       get_target_arch, get_chromedriver_version
 from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \
-                     execute, get_chromedriver_version, atom_gyp
+                     execute, atom_gyp
 
 
 ATOM_SHELL_VERSION = get_atom_shell_version()
@@ -96,8 +96,7 @@ def main():
 
   create_version()
   create_dist_zip()
-  if target_arch != 'arm':
-    create_chrome_binary_zip('chromedriver', get_chromedriver_version())
+  create_chrome_binary_zip('chromedriver', get_chromedriver_version())
   create_chrome_binary_zip('mksnapshot', ATOM_SHELL_VERSION)
   create_symbols_zip()
 
index ec10629..8264015 100644 (file)
@@ -37,6 +37,10 @@ def get_target_arch():
     return 'x64'
 
 
+def get_chromedriver_version():
+  return 'v2.15'
+
+
 def s3_config():
   config = (os.environ.get('ATOM_SHELL_S3_BUCKET', ''),
             os.environ.get('ATOM_SHELL_S3_ACCESS_KEY', ''),
index 0111294..fc52d31 100644 (file)
@@ -190,13 +190,6 @@ def get_atom_shell_version():
   return 'v' + atom_gyp()['version%']
 
 
-def get_chromedriver_version():
-  SOURCE_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
-  chromedriver = os.path.join(SOURCE_ROOT, 'dist', 'chromedriver')
-  output = subprocess.check_output([chromedriver, '-v']).strip()
-  return 'v' + output[13:output.rfind(' ')]
-
-
 def parse_version(version):
   if version[0] == 'v':
     version = version[1:]
index 67ce921..9757fe6 100755 (executable)
@@ -7,9 +7,9 @@ import subprocess
 import sys
 import tempfile
 
-from lib.config import PLATFORM, get_target_arch
+from lib.config import PLATFORM, get_target_arch, get_chromedriver_version
 from lib.util import atom_gyp, execute, get_atom_shell_version, parse_version, \
-                     get_chromedriver_version, scoped_cwd
+                     scoped_cwd
 from lib.github import GitHub
 
 
@@ -83,7 +83,7 @@ def main():
   upload_atom_shell(github, release, os.path.join(DIST_DIR, SYMBOLS_NAME))
 
   # Upload chromedriver and mksnapshot for minor version update.
-  if get_target_arch() != 'arm' and parse_version(args.version)[2] == '0':
+  if parse_version(args.version)[2] == '0':
     chromedriver = 'chromedriver-{0}-{1}-{2}.zip'.format(
         get_chromedriver_version(), PLATFORM, get_target_arch())
     upload_atom_shell(github, release, os.path.join(DIST_DIR, chromedriver))