File tree 4 files changed +11
-62
lines changed
4 files changed +11
-62
lines changed Original file line number Diff line number Diff line change 10
10
"publish" : false
11
11
},
12
12
"hooks" : {
13
- "after:bump" : " npm run manifest && npm run build && npm run beforerelease && npm run compress" ,
13
+ "after:bump" : " npm run manifest && export REACT_APP_IS_RELEASE=true && npm run build && npm run compress" ,
14
14
"after:release" : " echo Successfully released ${name} v${version} to ${repo.repository}."
15
15
}
16
16
}
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import Web from '@sap_oss/automated-usage-tracking-tool'
2
2
3
3
const getCredentials = ( ) => {
4
- const REACT_APP_TRACKER_API_KEY_PROD = '4_wjgLxoy9B1oRh3zpBulDhw'
5
- const REACT_APP_TRACKER_DATA_CENTER_PROD = 'eu1'
6
- const REACT_APP_TRACKER_API_KEY_DEV = process . env . REACT_APP_TRACKER_API_KEY_DEV
7
- const REACT_APP_TRACKER_DATA_CENTER_DEV = process . env . REACT_APP_TRACKER_DATA_CENTER_DEV
8
-
9
- // This variable is replaced to "false" on "beforeRelease.js" script
10
- const isDev = '{{REPLACED_IN_RELEASE}}'
11
-
12
- if ( ! isDev ) {
13
- return { apiKey : REACT_APP_TRACKER_API_KEY_PROD , dataCenter : REACT_APP_TRACKER_DATA_CENTER_PROD }
4
+ const IS_RELEASE = process . env . REACT_APP_IS_RELEASE
5
+ const TRACKER_API_KEY_PROD = '4_wjgLxoy9B1oRh3zpBulDhw'
6
+ const TRACKER_DATA_CENTER_PROD = 'eu1'
7
+ const TRACKER_API_KEY_DEV = process . env . REACT_APP_TRACKER_API_KEY_DEV
8
+ const TRACKER_DATA_CENTER_DEV = process . env . REACT_APP_TRACKER_DATA_CENTER_DEV
9
+
10
+ if ( IS_RELEASE ) {
11
+ return { apiKey : TRACKER_API_KEY_PROD , dataCenter : TRACKER_DATA_CENTER_PROD }
14
12
}
15
13
16
- if ( ! REACT_APP_TRACKER_API_KEY_DEV || ! REACT_APP_TRACKER_DATA_CENTER_DEV ) {
14
+ if ( ! TRACKER_API_KEY_DEV || ! TRACKER_DATA_CENTER_DEV ) {
17
15
return null
18
16
}
19
17
20
- return { apiKey : REACT_APP_TRACKER_API_KEY_DEV , dataCenter : REACT_APP_TRACKER_DATA_CENTER_DEV }
18
+ return { apiKey : TRACKER_API_KEY_DEV , dataCenter : TRACKER_DATA_CENTER_DEV }
21
19
}
22
20
23
21
export const initTracker = ( ) => {
You can’t perform that action at this time.
0 commit comments