Resolved production build challenges. Deployed as 1.6.0-9

This commit is contained in:
Patrick Fic
2024-02-29 23:39:56 -08:00
parent 519efb7119
commit 0bd8935359
3 changed files with 48 additions and 55 deletions

View File

@@ -4,14 +4,17 @@
"slug": "imexmobile", "slug": "imexmobile",
"version": "1.6.0", "version": "1.6.0",
"extra": { "extra": {
"expover": "8", "expover": "9",
"eas": { "eas": {
"projectId": "ffe01f3a-d507-4698-82cd-da1f1cad450b" "projectId": "ffe01f3a-d507-4698-82cd-da1f1cad450b"
} }
}, },
"orientation": "default", "orientation": "default",
"icon": "./assets/logo192noa.png", "icon": "./assets/logo192noa.png",
"platforms": ["ios", "android"], "platforms": [
"ios",
"android"
],
"ios": { "ios": {
"supportsTablet": true, "supportsTablet": true,
"bundleIdentifier": "com.imex.imexmobile", "bundleIdentifier": "com.imex.imexmobile",
@@ -24,7 +27,7 @@
}, },
"android": { "android": {
"package": "com.imex.imexmobile", "package": "com.imex.imexmobile",
"versionCode": 1100033, "versionCode": 1100034,
"googleServicesFile": "./google-services.json", "googleServicesFile": "./google-services.json",
"permissions": [ "permissions": [
"android.permission.READ_EXTERNAL_STORAGE", "android.permission.READ_EXTERNAL_STORAGE",
@@ -40,9 +43,12 @@
"icon": "./assets/logo192noa.png" "icon": "./assets/logo192noa.png"
}, },
"updates": { "updates": {
"fallbackToCacheTimeout": 0 "fallbackToCacheTimeout": 0,
"url": "https://u.expo.dev/ffe01f3a-d507-4698-82cd-da1f1cad450b"
}, },
"assetBundlePatterns": ["**/*"], "assetBundlePatterns": [
"**/*"
],
"web": { "web": {
"favicon": "./assets/logo192noa.png", "favicon": "./assets/logo192noa.png",
"config": { "config": {
@@ -77,6 +83,9 @@
} }
], ],
"expo-localization" "expo-localization"
] ],
"runtimeVersion": {
"policy": "appVersion"
}
} }
} }

View File

@@ -9,14 +9,10 @@
"distribution": "internal" "distribution": "internal"
}, },
"test": { "test": {
"releaseChannel": "test", "channel": "test"
"channel": "test",
"env": { "API_URL": "https://api.test.imex.online" }
}, },
"production": { "production": {
"channel": "production", "channel": "production"
"releaseChannel": "production",
"env": { "ANDROID_SDK_ROOT": "/Users/pfic/Library/Android/sdk" }
} }
}, },
"submit": { "submit": {

74
env.js
View File

@@ -1,62 +1,50 @@
import * as Updates from "expo-updates"; import * as Updates from 'expo-updates';
const ENV = { const ENV = {
test: { test: {
API_URL: "https://api.test.imex.online", API_URL: 'https://api.test.imex.online',
uri: "https://db.test.bodyshop.app/v1/graphql", uri: 'https://db.test.bodyshop.app/v1/graphql',
wsuri: "wss://db.test.bodyshop.app/v1/graphql", wsuri: 'wss://db.test.bodyshop.app/v1/graphql',
REACT_APP_CLOUDINARY_ENDPOINT_API: REACT_APP_CLOUDINARY_ENDPOINT_API:
"https://api.cloudinary.com/v1_1/bodyshop", 'https://api.cloudinary.com/v1_1/bodyshop',
REACT_APP_CLOUDINARY_ENDPOINT: "https://res.cloudinary.com/bodyshop", REACT_APP_CLOUDINARY_ENDPOINT: 'https://res.cloudinary.com/bodyshop',
REACT_APP_CLOUDINARY_API_KEY: "473322739956866", REACT_APP_CLOUDINARY_API_KEY: '473322739956866',
REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS: "c_fill,h_250,w_250", REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS: 'c_fill,h_250,w_250',
firebase: { firebase: {
apiKey: "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c", apiKey: 'AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c',
authDomain: "imex-test.firebaseapp.com", authDomain: 'imex-test.firebaseapp.com',
projectId: "imex-test", projectId: 'imex-test',
storageBucket: "imex-test.appspot.com", storageBucket: 'imex-test.appspot.com',
messagingSenderId: "991923618608", messagingSenderId: '991923618608',
appId: "1:991923618608:web:633437569cdad78299bef5", appId: '1:991923618608:web:633437569cdad78299bef5',
measurementId: "G-TW0XLZEH18", measurementId: 'G-TW0XLZEH18',
}, },
}, },
prod: { prod: {
API_URL: "https://api.imex.online", API_URL: 'https://api.imex.online',
uri: "https://db.imex.online/v1/graphql", uri: 'https://db.imex.online/v1/graphql',
wsuri: "wss://db.imex.online/v1/graphql", wsuri: 'wss://db.imex.online/v1/graphql',
REACT_APP_CLOUDINARY_ENDPOINT_API: REACT_APP_CLOUDINARY_ENDPOINT_API:
"https://api.cloudinary.com/v1_1/bodyshop", 'https://api.cloudinary.com/v1_1/bodyshop',
REACT_APP_CLOUDINARY_ENDPOINT: "https://res.cloudinary.com/bodyshop", REACT_APP_CLOUDINARY_ENDPOINT: 'https://res.cloudinary.com/bodyshop',
REACT_APP_CLOUDINARY_API_KEY: "473322739956866", REACT_APP_CLOUDINARY_API_KEY: '473322739956866',
REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS: "c_fill,h_250,w_250", REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS: 'c_fill,h_250,w_250',
firebase: { firebase: {
apiKey: "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU", apiKey: 'AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU',
authDomain: "imex-prod.firebaseapp.com", authDomain: 'imex-prod.firebaseapp.com',
databaseURL: "https://imex-prod.firebaseio.com", databaseURL: 'https://imex-prod.firebaseio.com',
projectId: "imex-prod", projectId: 'imex-prod',
storageBucket: "imex-prod.appspot.com", storageBucket: 'imex-prod.appspot.com',
messagingSenderId: "253497221485", messagingSenderId: '253497221485',
appId: "1:253497221485:web:3c81c483b94db84b227a64", appId: '1:253497221485:web:3c81c483b94db84b227a64',
measurementId: "G-NTWBKG2L0M", measurementId: 'G-NTWBKG2L0M',
}, },
}, },
}; };
function getEnvVars() { function getEnvVars() {
if (process.env.NODE_ENV === "development") return ENV.test; if (Updates.channel !== 'production') return ENV.test;
let releaseChannel = Updates.channel;
if (
releaseChannel === null ||
releaseChannel === undefined ||
releaseChannel === ""
)
return ENV.test;
if (releaseChannel.indexOf("development") !== -1) return ENV.test;
if (releaseChannel.indexOf("test") !== -1) return ENV.test;
if (releaseChannel.indexOf("default") !== -1) return ENV.test;
else return ENV.prod; else return ENV.prod;
} }