-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into expo-build-for-pr
- Loading branch information
Showing
83 changed files
with
1,593 additions
and
1,027 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 3 additions & 5 deletions
8
{{cookiecutter.project_slug}}/clients/mobile/react-native/.env.example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# These variables are available only when running locally | ||
# You can use this file to override them by prefixing with `EXPO_PUBLIC_` | ||
|
||
# BACKEND_SERVER_URL="https://{{ cookiecutter.project_slug }}-staging.herokuapp.com" | ||
# ROLLBAR_ACCESS_TOKEN='' | ||
# SENTRY_PROJECT_NAME='' | ||
# SENTRY_DSN="" | ||
# SENTRY_AUTH_TOKEN="" | ||
# EXPO_PUBLIC_BACKEND_SERVER_URL="https://{{ cookiecutter.project_slug }}-staging.herokuapp.com" | ||
# EXPO_PUBLIC_ROLLBAR_ACCESS_TOKEN='' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 20 additions & 14 deletions
34
{{cookiecutter.project_slug}}/clients/mobile/react-native/Config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,36 @@ | ||
import Logger from './logger' | ||
import { BACKEND_SERVER_URL, ROLLBAR_ACCESS_TOKEN, SENTRY_DSN } from '@env' | ||
import Constants, { ExecutionEnvironment } from 'expo-constants' | ||
import { Platform } from 'react-native' | ||
import Constants from 'expo-constants' | ||
import Logger from './logger' | ||
|
||
const BACKEND_SERVER_URL = process.env.EXPO_PUBLIC_BACKEND_SERVER_URL | ||
const SENTRY_DSN = process.env.EXPO_PUBLIC_SENTRY_DSN | ||
const ROLLBAR_ACCESS_TOKEN = process.env.EXPO_PUBLIC_ROLLBAR_ACCESS_TOKEN | ||
|
||
const { backendServerUrl, buildEnv, rollbarAccessToken, sentryDSN } = Constants?.expoConfig?.extra | ||
const { backendServerUrl, rollbarAccessToken, sentryDSN } = Constants?.expoConfig?.extra | ||
|
||
const isExpoGo = Constants.executionEnvironment === ExecutionEnvironment.StoreClient | ||
const isAndroid = Platform.OS === 'android' | ||
let rollbarToken = isAndroid ? undefined : ROLLBAR_ACCESS_TOKEN | ||
|
||
const ENV = () => { | ||
if (buildEnv) { | ||
rollbarToken = rollbarAccessToken | ||
if (!isExpoGo) { | ||
let rollbarToken = isAndroid ? undefined : rollbarAccessToken | ||
const logger = new Logger(rollbarToken).logger | ||
return { | ||
backendServerUrl: backendServerUrl, | ||
logger: new Logger(rollbarToken).logger, | ||
sentryDSN: sentryDSN, | ||
backendServerUrl, | ||
logger, | ||
sentryDSN, | ||
} | ||
} | ||
|
||
let rollbarToken = isAndroid ? undefined : ROLLBAR_ACCESS_TOKEN | ||
const logger = new Logger(rollbarToken).logger | ||
return { | ||
backendServerUrl: BACKEND_SERVER_URL, | ||
logger: new Logger(rollbarToken).logger, | ||
logger, | ||
sentryDSN: SENTRY_DSN, | ||
isExpoGo, | ||
} | ||
} | ||
|
||
Config = { ...ENV() } | ||
|
||
export default Config | ||
const Config = { ...ENV() } | ||
export default Config |
Oops, something went wrong.