sentry-cli icon indicating copy to clipboard operation
sentry-cli copied to clipboard

–-strip-prefix does not seem to work

Open coder-guy22296 opened this issue 8 years ago • 6 comments

–-strip-prefix seems to have no effect whatsoever

artifacts are being uploaded as: ~/dist/10.a5b01fab658e826851b0.map I want them to be uploaded as: ~/10.a5b01fab658e826851b0.map

I assumed that --strip-prefix ~/dist/ would solve this issue. I have not found anything in the docs to indicate this is wrong.

I have even taken a peek at the sentry-cli source code: https://github.com/getsentry/sentry-cli/blob/master/src/commands/releases.rs#L762

I also posted on the sentry forum: https://forum.sentry.io/t/sentry-cli-strip-prefix-does-not-seem-to-work/5373 can anybody offer some suggestions? sentry-cli v1.37.0

coder-guy22296 avatar Dec 03 '18 19:12 coder-guy22296

sentry-cli releases files testCLIRelease upload-sourcemaps . --ext map --ignore node_modules --strip-prefix '~/dist/' --rewrite

coder-guy22296 avatar Dec 05 '18 23:12 coder-guy22296

I have the same issue.

cloetensbrecht avatar Dec 20 '18 10:12 cloetensbrecht

a workaround that worked for me is to use include: './dist/', I only needed to upload items from dist

new SentryWebpackPlugin({
  include: './dist/',
  ext: ['map'],
  ignore: ['node_modules', 'weback.config.js'],
})

coder-guy22296 avatar Jan 29 '19 21:01 coder-guy22296

Definitely it looks like a bug in the --strip-prefix implementation. I'm not a rust guy but this function could be the culprit: https://github.com/getsentry/sentry-cli/blob/7741826c59f5ad8c14def29e4756019a5c4825d6/src/utils/sourcemaps.rs#L416

It would be nice to have some support from Sentry as we're paying for it.

gabrieleantonini avatar Mar 27 '19 11:03 gabrieleantonini

Is anyone going to look into this? I have the same issue. Would be nice to get some input from sentry.. it's been open for 10 months with absolutely no response

skewis6 avatar Sep 04 '19 16:09 skewis6

Is anyone going to look into this? I have the same issue. Would be nice to get some input from sentry.. it's been open for 13 months with absolutely no response

gitzhaochen avatar Dec 23 '19 12:12 gitzhaochen