mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-11 19:35:32 +00:00
fix(developer): strip paths from keymanweb sourcemaps when uploading to sentry
For keymanweb distribution only, strip all paths from sourcemaps when uploading to Sentry, by running the sourcemap upload from the specific folder. This maps to sentry-manager's stripping of paths in its reporting.
This commit is contained in:
parent
5900ab4079
commit
34f144259a
1 changed files with 14 additions and 3 deletions
|
|
@ -71,13 +71,24 @@ echo "Uploading symbols for developer/"
|
|||
--no-zips \
|
||||
src/
|
||||
|
||||
for sourcemap_path in "${sourcemap_paths[@]}"; do
|
||||
./src/kmc/node_modules/.bin/sentry-cli sourcemaps upload \
|
||||
upload_sourcemap() {
|
||||
local smpath="$1"
|
||||
"$KEYMAN_ROOT/developer/src/kmc/node_modules/.bin/sentry-cli" sourcemaps upload \
|
||||
--no-dedupe \
|
||||
--org keyman \
|
||||
--project keyman-developer \
|
||||
--release "$VERSION_GIT_TAG" \
|
||||
--dist "$VERSION_ENVIRONMENT" \
|
||||
--ext js --ext mjs --ext ts --ext map \
|
||||
"$sourcemap_path"
|
||||
"$smpath"
|
||||
}
|
||||
|
||||
# Separate sourcemap upload for KeymanWeb to avoid pathing
|
||||
cd "$KEYMAN_ROOT/developer/bin/server/build/src/site/resource"
|
||||
upload_sourcemap .
|
||||
cd "$KEYMAN_ROOT/developer"
|
||||
|
||||
# Upload all other sourcemaps
|
||||
for sourcemap_path in "${sourcemap_paths[@]}"; do
|
||||
upload_sourcemap "$sourcemap_path"
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue