diff --git a/app.json b/app.json index a606769..4f4e6e7 100644 --- a/app.json +++ b/app.json @@ -38,8 +38,8 @@ "@sentry/react-native/expo", { "url": "https://sentry.io/", - "organization": "sentry org slug, or use the `SENTRY_ORG` environment variable", - "project": "sentry project name, or use the `SENTRY_PROJECT` environment variable" + "organization": "CHANGE THIS: sentry org slug, or use the `SENTRY_ORG` environment variable", + "project": "CHANGE THIS: sentry project name, or use the `SENTRY_PROJECT` environment variable" } ] ] diff --git a/eas.json b/eas.json index c0843df..562d3d9 100644 --- a/eas.json +++ b/eas.json @@ -1,7 +1,8 @@ { "cli": { "version": ">= 3.13.3", - "promptToConfigurePushNotifications": false + "promptToConfigurePushNotifications": false, + "appVersionSource": "remote" }, "build": { "development": { @@ -9,9 +10,11 @@ "distribution": "internal" }, "preview": { - "distribution": "internal" + "distribution": "store", + "autoIncrement": true }, "production": { + "autoIncrement": true, "android": { "image": "latest" }, diff --git a/env.ts b/env.ts index 60b6ce3..b4772f1 100644 --- a/env.ts +++ b/env.ts @@ -11,10 +11,11 @@ const env = createEnv({ }, /** - * What object holds the environment variables at runtime. This is usually - * `process.env` or `import.meta.env`. + * What object holds the environment variables at runtime. Map these manually like below. */ - runtimeEnv: process.env, + runtimeEnv: { + EXPO_PUBLIC_API_URL: process.env.EXPO_PUBLIC_API_URL, + }, }); export default env; diff --git a/scripts/infisical.sh b/scripts/infisical.sh index 6601174..74a7738 100755 --- a/scripts/infisical.sh +++ b/scripts/infisical.sh @@ -35,9 +35,12 @@ if [ "$EAS_BUILD_PROFILE" = "production" ]; then fi echo "Using environment: $ENVIRONMENT" +SECRET_PATH="/native" +WORKSPACE_ID="650c0ca916f6d380e9193251" + # Fetch secrets and create .env file echo "Fetching secrets and creating .env file..." -curl "https://app.infisical.com/api/v3/secrets/raw?environment=$ENVIRONMENT&secretPath=/native&workspaceId=650c0ca916f6d380e9193251" \ +curl "https://app.infisical.com/api/v3/secrets/raw?environment=$ENVIRONMENT&secretPath=$SECRET_PATH&workspaceId=$WORKSPACE_ID" \ --header "Authorization: Bearer $INFISICAL_TOKEN" | \ use_jq -r '.secrets[] | "\(.secretKey)=\(.secretValue)"' > .env