From a717235212b7f7cac8bc9cc8b0ad28878846aa50 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 20 Sep 2014 22:39:52 +0800 Subject: [PATCH] Only include chromedriver in vX.X.0 releases. --- docs/tutorial/using-selenium-and-webdriver.md | 4 ++++ script/bump-version.py | 13 +------------ script/lib/util.py | 11 +++++++++++ script/upload.py | 11 +++++++---- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/docs/tutorial/using-selenium-and-webdriver.md b/docs/tutorial/using-selenium-and-webdriver.md index 1aad899f..1c0b8a5c 100644 --- a/docs/tutorial/using-selenium-and-webdriver.md +++ b/docs/tutorial/using-selenium-and-webdriver.md @@ -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 diff --git a/script/bump-version.py b/script/bump-version.py index a1ce4a20..d06bd414 100755 --- a/script/bump-version.py +++ b/script/bump-version.py @@ -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' diff --git a/script/lib/util.py b/script/lib/util.py index ead33ef6..c9ff6c84 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -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', ''), diff --git a/script/upload.py b/script/upload.py index 230648a2..5f398499 100755 --- a/script/upload.py +++ b/script/upload.py @@ -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() -- 2.43.0