зеркало из https://github.com/electron/electron.git
Only include chromedriver in vX.X.0 releases.
This commit is contained in:
Родитель
805215be78
Коммит
a717235212
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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', ''),
|
||||
|
|
|
@ -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()
|
||||
|
|
Загрузка…
Ссылка в новой задаче