Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ matrix:
- $HOME/.gradle/wrapper/
sudo: required
before_install:
- nvm install 7
- nvm install 8
- node --version
- travis_retry curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Expand Down
4 changes: 2 additions & 2 deletions SentryReactNative.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Pod::Spec.new do |s|
s.preserve_paths = '*.js'

s.dependency 'React'
s.dependency 'Sentry', '~> 3.4.2'
s.dependency 'Sentry/KSCrash', '~> 3.4.2'
s.dependency 'Sentry', '~> 3.4.3'
s.dependency 'Sentry/KSCrash', '~> 3.4.3'

s.source_files = 'ios/RNSentry*.{h,m}'
s.public_header_files = 'ios/RNSentry.h'
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ android {

dependencies {
compile 'com.facebook.react:react-native:+'
compile 'io.sentry:sentry-android:1.4.0'
compile 'io.sentry:sentry-android:1.5.1'
}
4 changes: 3 additions & 1 deletion appium/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ copy-local-files-to-example:
find example/node_modules/react-native-sentry/ios -name 'RN*.[h|m]' -exec rm {} \;
rm -rf example/node_modules/react-native-sentry/ios/Sentry/Sources/Sentry/*
rm -rf example/node_modules/react-native-sentry/android/*
rm -rf example/node_modules/react-native-sentry/scripts/*
cp -r ../lib/* example/node_modules/react-native-sentry/lib/
cp -r ../scripts/* example/node_modules/react-native-sentry/scripts/
find ../ios -name 'RN*.[h|m]' -exec cp {} example/node_modules/react-native-sentry/ios/ \;
cp -r ../android/* example/node_modules/react-native-sentry/android/
cp -r ../ios/Sentry/Sources/Sentry/* example/node_modules/react-native-sentry/ios/Sentry/Sources/Sentry/
Expand All @@ -33,6 +35,6 @@ local-android-test:
fastlane build_android_for_device_farm
ANDROID=1 pytest -vv tests/test_android.py

local-test:
local-test: create-test-bundle new-demo-project copy-local-files-to-example
fastlane build_for_local_appium
pytest -vv tests/test_ios.py
2 changes: 1 addition & 1 deletion examples
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"chalk": "^1.1.1",
"glob": "7.1.1",
"inquirer": "3.0.6",
"raven-js": "^3.16.1",
"sentry-cli-binary": "^1.16.0",
"raven-js": "^3.17.0",
"sentry-cli-binary": "^1.19.1",
"xcode": "0.9.3"
},
"rnpm": {
Expand Down
10 changes: 7 additions & 3 deletions scripts/postlink.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const inquirer = require('inquirer');
const xcode = require('xcode');
const chalk = require('chalk');
const pbxFile = require('xcode/lib/pbxFile');

const path = require('path');
const PLATFORMS = ['android', 'ios'];
const OBJC_HEADER =
'\
Expand Down Expand Up @@ -141,7 +141,10 @@ function getProperties(platform) {
{
type: 'input',
default: cachedProps['defaults/url'] || process.env.SENTRY_URL || getDefaultUrl(),
message: 'The Sentry Server URL for ' + getPlatformName(platform),
message:
'The Sentry Server URL for ' +
getPlatformName(platform) +
'. Only needed if you use self hosted Sentry, press enter to use default.',
name: 'defaults/url'
},
{
Expand Down Expand Up @@ -383,7 +386,8 @@ function addSentryInit() {
function resolveSentryCliBinaryPath(props) {
return new Promise(function(resolve, reject) {
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

} catch (e) {
// we do nothing and leave everyting as it is
}
Expand Down