]> khamidou — GitHub mirrors - electron.git/commitdiff
Only include chromedriver in vX.X.0 releases.
authorCheng Zhao <zcbenz@gmail.com>
Sat, 20 Sep 2014 14:39:52 +0000 (22:39 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 20 Sep 2014 14:39:52 +0000 (22:39 +0800)
docs/tutorial/using-selenium-and-webdriver.md
script/bump-version.py
script/lib/util.py
script/upload.py

index 1aad899fd5d5467584537a731f4a09ff0a4e8e7a..1c0b8a5cf269a1008d1ed015f055ea033ec0d646 100644 (file)
@@ -13,6 +13,10 @@ can find archives of `chromedriver`, there is no difference between atom-shell's
 distribution of `chromedriver` and upstream ones, so in order to use
 `chromedriver` together with atom-shell, you will need some special setup.
 
+Also notice that only minor version update releases (e.g. `vX.X.0` releases)
+include `chromedriver` archives, because `chromedriver` doesn't change as
+frequent as atom-shell itself.
+
 ## Setting up with WebDriverJs
 
 [WebDriverJs](https://code.google.com/p/selenium/wiki/WebDriverJs) provided
index a1ce4a20bfeb5581885b78f70011d13cf1f56392..d06bd414815f72fb32ac221adc2b74684d1a1d74 100755 (executable)
@@ -4,7 +4,7 @@ import os
 import re
 import sys
 
-from lib.util import execute, get_atom_shell_version, scoped_cwd
+from lib.util import execute, get_atom_shell_version, parse_version, scoped_cwd
 
 
 SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
@@ -35,17 +35,6 @@ def main():
     git_push()
 
 
-def parse_version(version):
-  if version[0] == 'v':
-    version = version[1:]
-
-  vs = version.split('.')
-  if len(vs) > 4:
-    return vs[0:4]
-  else:
-    return vs + ['0'] * (4 - len(vs))
-
-
 def increase_version(versions, index):
   for i in range(index + 1, 4):
     versions[i] = '0'
index ead33ef636555852db8a4ae26128db232765c8ec..c9ff6c84f9411aee96e8db6e8b223f21c963a45f 100644 (file)
@@ -146,6 +146,17 @@ def get_atom_shell_version():
   return subprocess.check_output(['git', 'describe', '--tags']).strip()
 
 
+def parse_version(version):
+  if version[0] == 'v':
+    version = version[1:]
+
+  vs = version.split('.')
+  if len(vs) > 4:
+    return vs[0:4]
+  else:
+    return vs + ['0'] * (4 - len(vs))
+
+
 def s3_config():
   config = (os.environ.get('ATOM_SHELL_S3_BUCKET', ''),
             os.environ.get('ATOM_SHELL_S3_ACCESS_KEY', ''),
index 230648a267648a0bbdae50cb50ae0618b56853fa..5f3984992e59092a1e69b8f569240288360dd16f 100755 (executable)
@@ -9,8 +9,8 @@ import sys
 import tempfile
 
 from lib.config import DIST_ARCH, TARGET_PLATFORM
-from lib.util import get_atom_shell_version, scoped_cwd, safe_mkdir, execute, \
-                     s3_config, s3put
+from lib.util import execute, get_atom_shell_version, parse_version, \
+                     scoped_cwd, safe_mkdir, s3_config, s3put
 from lib.github import GitHub
 
 
@@ -51,8 +51,11 @@ 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 chromedriver for minor version update.
+  if parse_version(args.version)[2] == '0':
+    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()