diff --git a/script/create-dist.py b/script/create-dist.py index 3a6fc145371e..4e24ab231fd0 100755 --- a/script/create-dist.py +++ b/script/create-dist.py @@ -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) diff --git a/script/lib/util.py b/script/lib/util.py index c9ff6c84f941..83c3e05148b4 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -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:] diff --git a/script/upload.py b/script/upload.py index 5f3984992e59..2ad7f5ffd8ef 100755 --- a/script/upload.py +++ b/script/upload.py @@ -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)