Skip to content

Commit

Permalink
build: upload sentry src bundles on windows as well (#24784)
Browse files Browse the repository at this point in the history
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
  • Loading branch information
trop[bot] and MarshallOfSound committed Jul 29, 2020
1 parent 05343a8 commit f65756b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .circleci/config.yml
Expand Up @@ -702,8 +702,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
Expand Down
15 changes: 13 additions & 2 deletions script/release/uploaders/upload-symbols.py
@@ -1,7 +1,8 @@
#!/usr/bin/env python

import os
import glob
import os
import subprocess
import sys

sys.path.append(
Expand All @@ -22,6 +23,10 @@
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)
Expand All @@ -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)
Expand Down

0 comments on commit f65756b

Please sign in to comment.