Skip to content

Conversation

@HazAT
Copy link
Member

@HazAT HazAT commented Aug 21, 2017

Fixes #191

@HazAT HazAT self-assigned this Aug 21, 2017
@HazAT HazAT requested review from jan-auer and mitsuhiko August 22, 2017 00:44
Copy link
Member

@jan-auer jan-auer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use yarn add --dev (or yarn add -D) to add the dependency. Otherwise, fine with me.

try {
props['cli/executable'] = require.resolve('sentry-cli-binary/bin/sentry-cli');
const cliPath = require.resolve('sentry-cli-binary/bin/sentry-cli');
props['cli/executable'] = path.relative(process.cwd(), cliPath);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty annoying that we need to do this. Should probably fix this in sentry-cli that it is always an absolute path.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually don't want to have an absolute path because when we write this in the properties file and when the user check this in to their CI we will get a bad path because /User/name/bla/bla isn't valid on the CI.
And we need to resolve the sentry-cli-binary with require.resolve because it could be in node_modules directly or within react-native-sentry/node_modules depending on the npm version the user is using.
So by converting the absolute path to a relative path this should always work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the file is absolutized at load time in sentry-cli. So not sure why the path would mismatch later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind. I see that you are persisting this. Ignore me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try this to get the path:

npm explore sentry-cli-binary -- npm bin

try {
props['cli/executable'] = require.resolve('sentry-cli-binary/bin/sentry-cli');
const cliPath = require.resolve('sentry-cli-binary/bin/sentry-cli');
props['cli/executable'] = path.relative(process.cwd(), cliPath);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind. I see that you are persisting this. Ignore me.

@bretthoerner
Copy link
Contributor

@HazAT don't release with sentry-java 1.5.0, apparently old Android versions may not have a very common class. I'm going to fix this now, sorry about that: getsentry/sentry-java#493

@bretthoerner
Copy link
Contributor

@HazAT OK I released sentry-android 1.5.1

@HazAT HazAT merged commit faec479 into master Aug 22, 2017
@HazAT HazAT deleted the feature/update-deps branch August 22, 2017 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants