]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix chromedriver's version in archive.
authorCheng Zhao <zcbenz@gmail.com>
Sat, 20 Sep 2014 15:09:49 +0000 (23:09 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 20 Sep 2014 15:09:49 +0000 (23:09 +0800)
script/create-dist.py
script/lib/util.py
script/upload.py

index 3a6fc145371e9d6059e7b64c9d4f0a4930bdc49c..4e24ab231fd047a279956be7e7aa05b652fb73c4 100755 (executable)
@@ -11,7 +11,7 @@ import tarfile
 from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, TARGET_PLATFORM, \
                        DIST_ARCH
 from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \
-                     safe_mkdir, execute
+                     safe_mkdir, execute, get_chromedriver_version
 
 
 ATOM_SHELL_VERSION = get_atom_shell_version()
@@ -240,7 +240,7 @@ def create_dist_zip():
 
 
 def create_chromedriver_zip():
-  dist_name = 'chromedriver-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
+  dist_name = 'chromedriver-{0}-{1}-{2}.zip'.format(get_chromedriver_version(),
                                                     TARGET_PLATFORM, DIST_ARCH)
   zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
 
index c9ff6c84f9411aee96e8db6e8b223f21c963a45f..83c3e05148b4cd64f8b37ae4cf846ea7bcbc6257 100644 (file)
@@ -146,6 +146,13 @@ def get_atom_shell_version():
   return subprocess.check_output(['git', 'describe', '--tags']).strip()
 
 
+def get_chromedriver_version():
+  SOURCE_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
+  chromedriver = os.path.join(SOURCE_ROOT, 'out', 'Release', 'chromedriver')
+  output = subprocess.check_output([chromedriver, '-v']).strip()
+  return 'v' + output[13:]
+
+
 def parse_version(version):
   if version[0] == 'v':
     version = version[1:]
index 5f3984992e59092a1e69b8f569240288360dd16f..2ad7f5ffd8efa4c928ba516dd399566a53a5e5c8 100755 (executable)
@@ -10,12 +10,14 @@ import tempfile
 
 from lib.config import DIST_ARCH, TARGET_PLATFORM
 from lib.util import execute, get_atom_shell_version, parse_version, \
-                     scoped_cwd, safe_mkdir, s3_config, s3put
+                     get_chromedriver_version, scoped_cwd, safe_mkdir, \
+                     s3_config, s3put
 from lib.github import GitHub
 
 
 ATOM_SHELL_REPO = 'atom/atom-shell'
 ATOM_SHELL_VERSION = get_atom_shell_version()
+CHROMEDRIVER_VERSION = get_chromedriver_version()
 
 SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
 OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'Release')
@@ -26,7 +28,7 @@ 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,
+CHROMEDRIVER_NAME = 'chromedriver-{0}-{1}-{2}.zip'.format(CHROMEDRIVER_VERSION,
                                                           TARGET_PLATFORM,
                                                           DIST_ARCH)