Hard code the chromedriver's version
It is not possible to run chromedriver for all targets.
This commit is contained in:
Родитель
cb92df687d
Коммит
b7cdb00d09
|
@ -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()
|
||||
|
||||
|
|
|
@ -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', ''),
|
||||
|
|
|
@ -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:]
|
||||
|
|
|
@ -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))
|
||||
|
|
Загрузка…
Ссылка в новой задаче