Update upload symbols script for posix
This commit is contained in:
parent
b3edfd7d89
commit
55c8aa7f1c
2 changed files with 24 additions and 19 deletions
|
@ -4,34 +4,39 @@ import os
|
||||||
import glob
|
import glob
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from lib.config import s3_config
|
from lib.config import PLATFORM, s3_config, enable_verbose_mode
|
||||||
from lib.util import electron_gyp, execute, rm_rf, safe_mkdir, s3put
|
from lib.util import electron_gyp, execute, rm_rf, safe_mkdir, s3put
|
||||||
|
|
||||||
|
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
SYMBOLS_DIR = 'dist\\symbols'
|
DIST_DIR = os.path.join(SOURCE_ROOT, 'dist')
|
||||||
DOWNLOAD_DIR = 'vendor\\download\\libchromiumcontent'
|
RELEASE_DIR = os.path.join(SOURCE_ROOT, 'out', 'R')
|
||||||
|
|
||||||
PROJECT_NAME = electron_gyp()['project_name%']
|
PROJECT_NAME = electron_gyp()['project_name%']
|
||||||
PRODUCT_NAME = electron_gyp()['product_name%']
|
PRODUCT_NAME = electron_gyp()['product_name%']
|
||||||
|
|
||||||
|
if PLATFORM == 'win32':
|
||||||
|
SYMBOLS_DIR = os.path.join(DIST_DIR, 'symbols')
|
||||||
|
else:
|
||||||
|
SYMBOLS_DIR = os.path.join(DIST_DIR, '{0}.breakpad.syms'.format(PROJECT_NAME))
|
||||||
|
|
||||||
PDB_LIST = [
|
PDB_LIST = [
|
||||||
'out\\R\\{0}.exe.pdb'.format(PROJECT_NAME),
|
os.path.join(RELEASE_DIR, '{0}.exe.pdb'.format(PROJECT_NAME)),
|
||||||
'out\\R\\node.dll.pdb',
|
os.path.join(RELEASE_DIR, 'node.dll.pdb')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
os.chdir(SOURCE_ROOT)
|
os.chdir(SOURCE_ROOT)
|
||||||
|
if PLATFORM == 'win32':
|
||||||
rm_rf(SYMBOLS_DIR)
|
for pdb in PDB_LIST:
|
||||||
safe_mkdir(SYMBOLS_DIR)
|
run_symstore(pdb, SYMBOLS_DIR, PRODUCT_NAME)
|
||||||
for pdb in PDB_LIST:
|
files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb')
|
||||||
run_symstore(pdb, SYMBOLS_DIR, PRODUCT_NAME)
|
files = [f.lower() for f in files]
|
||||||
|
else:
|
||||||
|
files = glob.glob(SYMBOLS_DIR + '/*/*/*.sym')
|
||||||
|
|
||||||
bucket, access_key, secret_key = s3_config()
|
bucket, access_key, secret_key = s3_config()
|
||||||
files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb')
|
|
||||||
files = [f.lower() for f in files]
|
|
||||||
upload_symbols(bucket, access_key, secret_key, files)
|
upload_symbols(bucket, access_key, secret_key, files)
|
||||||
|
|
||||||
|
|
|
@ -103,13 +103,13 @@ def main():
|
||||||
upload_electron(github, release, os.path.join(DIST_DIR, mksnapshot),
|
upload_electron(github, release, os.path.join(DIST_DIR, mksnapshot),
|
||||||
args)
|
args)
|
||||||
|
|
||||||
if PLATFORM == 'win32' and not tag_exists and not args.upload_to_s3:
|
if not tag_exists and not args.upload_to_s3:
|
||||||
# Upload PDBs to Windows symbol server.
|
# Upload symbols to symbol server.
|
||||||
run_python_script('upload-windows-pdb.py')
|
run_python_script('upload-symbols.py')
|
||||||
|
if PLATFORM == 'win32':
|
||||||
# Upload node headers.
|
# Upload node headers.
|
||||||
run_python_script('create-node-headers.py', '-v', args.version)
|
run_python_script('create-node-headers.py', '-v', args.version)
|
||||||
run_python_script('upload-node-headers.py', '-v', args.version)
|
run_python_script('upload-node-headers.py', '-v', args.version)
|
||||||
|
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
|
|
Loading…
Reference in a new issue