Skip to content

Commit

Permalink
delete sourcemap after sentry upload
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Nov 3, 2023
1 parent d43c8dc commit cc20e62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions other/sentry-create-release.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { createRelease } from '@sentry/remix/scripts/createRelease.js'
import fsExtra from 'fs-extra'
import { glob } from 'glob'
import 'dotenv/config'

const DEFAULT_URL_PREFIX = '#build/'
Expand All @@ -17,3 +19,7 @@ if (
'Missing Sentry environment variables, skipping sourcemap upload.',
)
}
const files = await glob(['./public/**/*.map', './build/**/*.map'])
for (const file of files) {
await fsExtra.remove(file)
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"express": "^4.18.2",
"express-rate-limit": "^7.0.1",
"get-port": "^7.0.0",
"glob": "^10.3.7",
"helmet": "^7.0.0",
"intl-parse-accept-language": "^1.0.0",
"isbot": "^3.7.0",
Expand Down Expand Up @@ -140,7 +141,6 @@
"eslint": "^8.50.0",
"eslint-config-prettier": "^9.0.0",
"fs-extra": "^11.1.1",
"glob": "^10.3.7",
"jsdom": "^22.1.0",
"msw": "0.0.0-fetch.rc-20",
"node-html-parser": "^6.1.10",
Expand Down

0 comments on commit cc20e62

Please sign in to comment.