2014-11-07 12:19:26 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import os
|
2014-11-07 12:51:25 +00:00
|
|
|
import glob
|
2014-11-07 12:19:26 +00:00
|
|
|
|
2015-04-12 04:00:02 +00:00
|
|
|
from lib.config import s3_config
|
|
|
|
from lib.util import execute, rm_rf, safe_mkdir, s3put
|
2014-11-07 12:19:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
|
|
|
SYMBOLS_DIR = 'dist\\symbols'
|
2014-11-10 15:33:56 +00:00
|
|
|
DOWNLOAD_DIR = 'vendor\\brightray\\vendor\\download\\libchromiumcontent'
|
2014-11-07 12:19:26 +00:00
|
|
|
PDB_LIST = [
|
2015-04-03 03:59:14 +00:00
|
|
|
'out\\R\\atom.exe.pdb',
|
2015-04-11 14:15:50 +00:00
|
|
|
'out\\R\\node.dll.pdb',
|
2014-11-07 12:19:26 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
os.chdir(SOURCE_ROOT)
|
|
|
|
|
|
|
|
rm_rf(SYMBOLS_DIR)
|
|
|
|
safe_mkdir(SYMBOLS_DIR)
|
|
|
|
for pdb in PDB_LIST:
|
|
|
|
run_symstore(pdb, SYMBOLS_DIR, 'AtomShell')
|
|
|
|
|
2014-11-07 12:51:25 +00:00
|
|
|
bucket, access_key, secret_key = s3_config()
|
|
|
|
files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb')
|
2014-11-10 15:07:57 +00:00
|
|
|
files = [f.lower() for f in files]
|
2014-11-07 12:51:25 +00:00
|
|
|
upload_symbols(bucket, access_key, secret_key, files)
|
|
|
|
|
2014-11-07 12:19:26 +00:00
|
|
|
|
|
|
|
def run_symstore(pdb, dest, product):
|
|
|
|
execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product])
|
|
|
|
|
|
|
|
|
2014-11-07 12:51:25 +00:00
|
|
|
def upload_symbols(bucket, access_key, secret_key, files):
|
2014-11-10 15:33:56 +00:00
|
|
|
s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols',
|
|
|
|
files)
|
2014-11-07 12:51:25 +00:00
|
|
|
|
|
|
|
|
2014-11-07 12:19:26 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
import sys
|
|
|
|
sys.exit(main())
|