File tree Expand file tree Collapse file tree 6 files changed +30
-12
lines changed Expand file tree Collapse file tree 6 files changed +30
-12
lines changed Original file line number Diff line number Diff line change 1+ # If you have an env file, and you've set SE variable to something
2+ # other than tda, prevent the release from happening
3+ if [ -f " .env" ]
4+ then
5+ export $( cat .env | xargs) # Set env vars from .env file so they're accessible
6+ if [[ $SE && $SE != ' tda' ]]
7+ then
8+ printf " Your SE environment variable is set to $SE .\nThe SE variable must be set to tda to create a release.\nPlease change it in your env file and try again."
9+ exit
10+ fi
11+ fi
12+
113PACKAGE_VERSION=$( node -p -e " require('./package.json').version" )
214REPO=sentry-demos/sentry_react_native
315
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import Toast from 'react-native-toast-message';
2323import { store } from './reduxApp' ;
2424import { DSN } from './config' ;
2525import { SE } from '@env' ; // SE is undefined if no .env file is set
26+ console . log ( "> SE" , SE )
2627
2728const reactNavigationV5Instrumentation = new Sentry . ReactNavigationV5Instrumentation (
2829 {
Original file line number Diff line number Diff line change @@ -124,6 +124,10 @@ const CartScreen = ({navigation}) => {
124124 return response ;
125125 } ;
126126
127+ React . useEffect ( ( ) => {
128+ fetch ( `${ BACKEND_URL } /success` ) // exists just to add span data to demo
129+ } , [ ] ) ;
130+
127131 return (
128132 < View style = { styles . screen } >
129133 < View style = { styles . titleContainer } >
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import Toast from 'react-native-toast-message';
1515import { AppDispatch , RootState } from '../reduxApp' ;
1616import { GradientBtn } from './CartScreen' ;
1717import { BACKEND_URL } from '../config' ;
18- // import {API_URL} from 'react-native-dotenv'
1918
2019export type UIToast = typeof Toast ;
2120
@@ -158,6 +157,10 @@ const CheckoutScreen = (props) => {
158157 )
159158 }
160159
160+ React . useEffect ( ( ) => {
161+ fetch ( `${ BACKEND_URL } /success` ) // exists just to add span data to demo
162+ } , [ ] ) ;
163+
161164 return (
162165 < View style = { styles . screen } >
163166 < Text
Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ const EmpowerPlant = ({navigation}) => {
7474 } , [ navigation ] ) ;
7575
7676 React . useEffect ( ( ) => {
77- fetch ( `${ BACKEND_URL } /success` ) // exists just to add span data to demo
7877 loadData ( ) ; // this line is not blocking
7978 } , [ ] ) ;
8079
@@ -176,9 +175,7 @@ const ProductItem = (props: {
176175 imgcropped : string ;
177176 appDispatch : AppDispatch ;
178177} ) : React . ReactElement => {
179- React . useEffect ( ( ) => {
180- fetch ( `${ BACKEND_URL } /success` ) // exists just to add span data to demo
181- } , [ ] ) ;
178+
182179 return (
183180 < View style = { styles . statisticContainer } >
184181 < View style = { styles . card } > { selectImage ( props . imgcropped ) } </ View >
Original file line number Diff line number Diff line change @@ -9,18 +9,14 @@ import {
99 View ,
1010} from 'react-native' ;
1111import { StackNavigationProp } from '@react-navigation/stack' ;
12- import {
13- CommonActions ,
14- useNavigation ,
15- useNavigationState ,
16- } from '@react-navigation/native' ;
12+ import { CommonActions } from '@react-navigation/native' ;
1713
1814import * as Sentry from '@sentry/react-native' ;
1915
2016const globalAny :any = global ;
2117
2218import { getTestProps } from '../../utils/getTestProps' ;
23- import { DSN } from '../config' ;
19+ import { DSN , BACKEND_URL } from '../config' ;
2420
2521interface Props {
2622 navigation : StackNavigationProp < any , 'HomeScreen' > ;
@@ -34,7 +30,8 @@ const HomeScreen = (props: Props) => {
3430
3531 const setScopeProps = ( ) => {
3632 const dateString = new Date ( ) . toString ( ) ;
37-
33+
34+ // user info was already set in App.tsx
3835 Sentry . setUser ( {
3936 id : 'test-id-0' ,
4037@@ -111,6 +108,10 @@ const HomeScreen = (props: Props) => {
111108 console . log ( 'Test scope properties were set.' ) ;
112109 } ;
113110
111+ React . useEffect ( ( ) => {
112+ fetch ( `${ BACKEND_URL } /success` )
113+ } , [ ] ) ;
114+
114115 return (
115116 < >
116117 < StatusBar barStyle = "dark-content" />
You can’t perform that action at this time.
0 commit comments