mas: Use mas as platform name in dist
This commit is contained in:
parent
df7a9b80b1
commit
48faf74f7f
3 changed files with 19 additions and 9 deletions
|
@ -8,7 +8,8 @@ import sys
|
||||||
import stat
|
import stat
|
||||||
|
|
||||||
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \
|
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, PLATFORM, \
|
||||||
get_target_arch, get_chromedriver_version
|
get_target_arch, get_chromedriver_version, \
|
||||||
|
get_platform_key
|
||||||
from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \
|
from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \
|
||||||
execute, atom_gyp
|
execute, atom_gyp
|
||||||
|
|
||||||
|
@ -170,7 +171,8 @@ def create_symbols():
|
||||||
|
|
||||||
def create_dist_zip():
|
def create_dist_zip():
|
||||||
dist_name = '{0}-{1}-{2}-{3}.zip'.format(PROJECT_NAME, ATOM_SHELL_VERSION,
|
dist_name = '{0}-{1}-{2}-{3}.zip'.format(PROJECT_NAME, ATOM_SHELL_VERSION,
|
||||||
PLATFORM, get_target_arch())
|
get_platform_key(),
|
||||||
|
get_target_arch())
|
||||||
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
||||||
|
|
||||||
with scoped_cwd(DIST_DIR):
|
with scoped_cwd(DIST_DIR):
|
||||||
|
@ -182,7 +184,7 @@ def create_dist_zip():
|
||||||
|
|
||||||
|
|
||||||
def create_chrome_binary_zip(binary, version):
|
def create_chrome_binary_zip(binary, version):
|
||||||
dist_name = '{0}-{1}-{2}-{3}.zip'.format(binary, version, PLATFORM,
|
dist_name = '{0}-{1}-{2}-{3}.zip'.format(binary, version, get_platform_key(),
|
||||||
get_target_arch())
|
get_target_arch())
|
||||||
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
||||||
|
|
||||||
|
@ -198,7 +200,7 @@ def create_chrome_binary_zip(binary, version):
|
||||||
def create_symbols_zip():
|
def create_symbols_zip():
|
||||||
dist_name = '{0}-{1}-{2}-{3}-symbols.zip'.format(PROJECT_NAME,
|
dist_name = '{0}-{1}-{2}-{3}-symbols.zip'.format(PROJECT_NAME,
|
||||||
ATOM_SHELL_VERSION,
|
ATOM_SHELL_VERSION,
|
||||||
PLATFORM,
|
get_platform_key(),
|
||||||
get_target_arch())
|
get_target_arch())
|
||||||
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,13 @@ PLATFORM = {
|
||||||
verbose_mode = False
|
verbose_mode = False
|
||||||
|
|
||||||
|
|
||||||
|
def get_platform_key():
|
||||||
|
if os.environ.has_key('MAS_BUILD'):
|
||||||
|
return 'mas'
|
||||||
|
else:
|
||||||
|
return PLATFORM
|
||||||
|
|
||||||
|
|
||||||
def get_target_arch():
|
def get_target_arch():
|
||||||
try:
|
try:
|
||||||
target_arch_path = os.path.join(__file__, '..', '..', '..', 'vendor',
|
target_arch_path = os.path.join(__file__, '..', '..', '..', 'vendor',
|
||||||
|
|
|
@ -7,7 +7,8 @@ import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from lib.config import PLATFORM, get_target_arch, get_chromedriver_version
|
from lib.config import PLATFORM, get_target_arch, get_chromedriver_version, \
|
||||||
|
get_platform_key
|
||||||
from lib.util import atom_gyp, execute, get_atom_shell_version, parse_version, \
|
from lib.util import atom_gyp, execute, get_atom_shell_version, parse_version, \
|
||||||
scoped_cwd
|
scoped_cwd
|
||||||
from lib.github import GitHub
|
from lib.github import GitHub
|
||||||
|
@ -24,14 +25,14 @@ OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
|
||||||
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
|
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
|
||||||
DIST_NAME = '{0}-{1}-{2}-{3}.zip'.format(PROJECT_NAME,
|
DIST_NAME = '{0}-{1}-{2}-{3}.zip'.format(PROJECT_NAME,
|
||||||
ATOM_SHELL_VERSION,
|
ATOM_SHELL_VERSION,
|
||||||
PLATFORM,
|
get_platform_key(),
|
||||||
get_target_arch())
|
get_target_arch())
|
||||||
SYMBOLS_NAME = '{0}-{1}-{2}-{3}-symbols.zip'.format(PROJECT_NAME,
|
SYMBOLS_NAME = '{0}-{1}-{2}-{3}-symbols.zip'.format(PROJECT_NAME,
|
||||||
ATOM_SHELL_VERSION,
|
ATOM_SHELL_VERSION,
|
||||||
PLATFORM,
|
get_platform_key(),
|
||||||
get_target_arch())
|
get_target_arch())
|
||||||
MKSNAPSHOT_NAME = 'mksnapshot-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
|
MKSNAPSHOT_NAME = 'mksnapshot-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
|
||||||
PLATFORM,
|
get_platform_key(),
|
||||||
get_target_arch())
|
get_target_arch())
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,7 +86,7 @@ def main():
|
||||||
# Upload chromedriver and mksnapshot for minor version update.
|
# Upload chromedriver and mksnapshot for minor version update.
|
||||||
if parse_version(args.version)[2] == '0':
|
if parse_version(args.version)[2] == '0':
|
||||||
chromedriver = 'chromedriver-{0}-{1}-{2}.zip'.format(
|
chromedriver = 'chromedriver-{0}-{1}-{2}.zip'.format(
|
||||||
get_chromedriver_version(), PLATFORM, get_target_arch())
|
get_chromedriver_version(), get_platform_key(), get_target_arch())
|
||||||
upload_atom_shell(github, release, os.path.join(DIST_DIR, chromedriver))
|
upload_atom_shell(github, release, os.path.join(DIST_DIR, chromedriver))
|
||||||
upload_atom_shell(github, release, os.path.join(DIST_DIR, MKSNAPSHOT_NAME))
|
upload_atom_shell(github, release, os.path.join(DIST_DIR, MKSNAPSHOT_NAME))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue