build: upload sentry src bundles on windows as well (#24773)

This commit is contained in:
Samuel Attard 2020-07-29 12:41:53 -07:00 committed by GitHub
parent 1b175a0609
commit 06cb550c75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View file

@ -745,8 +745,6 @@ step-maybe-generate-breakpad-symbols: &step-maybe-generate-breakpad-symbols
if [ "$GENERATE_SYMBOLS" == "true" ]; then
cd src
ninja -C out/Default electron:electron_symbols
cd out/Default/breakpad_symbols
find . -name \*.sym -print0 | xargs -0 npx @sentry/cli@1.51.1 difutil bundle-sources
fi
step-maybe-zip-symbols: &step-maybe-zip-symbols

View file

@ -1,7 +1,8 @@
#!/usr/bin/env python
import os
import glob
import os
import subprocess
import sys
sys.path.append(
@ -22,6 +23,10 @@ PDB_LIST = [
os.path.join(RELEASE_DIR, '{0}.exe.pdb'.format(PROJECT_NAME))
]
NPX_CMD = "npx"
if sys.platform == "win32":
NPX_CMD += ".cmd"
def main():
os.chdir(ELECTRON_DIR)
@ -30,7 +35,13 @@ def main():
run_symstore(pdb, SYMBOLS_DIR, PRODUCT_NAME)
files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb')
else:
files = glob.glob(SYMBOLS_DIR + '/*/*/*.sym') + glob.glob(SYMBOLS_DIR + '/*/*/*.src.zip')
files = glob.glob(SYMBOLS_DIR + '/*/*/*.sym')
for symbol_file in files:
print("Generating Sentry src bundle for: " + symbol_file)
subprocess.check_output([NPX_CMD, '@sentry/cli@1.51.1', 'difutil', 'bundle-sources', symbol_file])
files += glob.glob(SYMBOLS_DIR + '/*/*/*.src.zip')
# The file upload needs to be atom-shell/symbols/:symbol_name/:hash/:symbol
os.chdir(SYMBOLS_DIR)