mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Fix chromedriver's version in archive.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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:]
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user