Initial consolidatio of rome and imex versions.

This commit is contained in:
Patrick Fic
2025-10-24 11:29:14 -07:00
parent 75ee01e896
commit bc22c823f9
15 changed files with 295 additions and 23 deletions

57
app.config.js Normal file
View File

@@ -0,0 +1,57 @@
const IS_ROME = process.env.APP_VARIANT === 'ROME';
export default ({ config }) => {
//console.log("Expo", JSON.stringify(config, null, 2))
return ({
...config,
name: IS_ROME ? "Rome Mobile" : "ImEX Mobile",
slug: IS_ROME ? "rome-mobile" : "imexmobile",
extra: {
...config.extra,
eas: {
...config.extra.eas,
projectId: IS_ROME ? "df105e21-a07f-4425-af10-2200a7704a48" : "ffe01f3a-d507-4698-82cd-da1f1cad450b"
}
},
icon: IS_ROME ? "./assets/RomeIcon.png" : "./assets/logo192noa.png",
ios: {
...config.ios,
bundleIdentifier: IS_ROME ? "com.rome.mobile" : "com.imex.imexmobile"
},
android: {
...config.android,
package: IS_ROME ? "com.rome.mobile" : "com.imex.imexmobile"
},
splash: {
...config.splash,
image: IS_ROME ? "./assets/RomeSplash.png" : "./assets/ImEXSplash.png" //Make sure these exist
},
notification: {
...config.notification,
icon: IS_ROME ? "./assets/RomeNotificationIcon.png" : "./assets/ImEXNotificationIcon.png" // Make sure these exist
},
updates: {
...config.updates,
url: IS_ROME ? "https://u.expo.dev/df105e21-a07f-4425-af10-2200a7704a48" : "https://u.expo.dev/ffe01f3a-d507-4698-82cd-da1f1cad450b"
},
web: {
...config.web,
favicon: IS_ROME ? "./assets/RomeIcon.png" : "./assets/ImEXlogo192noa.png",
config: {
...config.web.config,
firebase: {
...config.web.config.firebase,
"apiKey": IS_ROME ? "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE" : "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU",
"authDomain": IS_ROME ? "rome-prod-1.firebaseapp.com" : "imex-prod.firebaseapp.com",
"projectId": IS_ROME ? "rome-prod-1" : "imex-prod",
"storageBucket": IS_ROME ? "rome-prod-1.appspot.com" : "imex-prod.appspot.com",
"messagingSenderId": IS_ROME ? "147786367145" : "253497221485",
"appId": IS_ROME ? "1:147786367145:web:9d4cba68071c3f29a8a9b8" : "1:253497221485:web:9b65736a635a45ce227a64",
"measurementId": IS_ROME ? "G-G8Z9DRHTZS" : "G-96694D66L2"
}
}
}
})
};

View File

@@ -13,7 +13,7 @@
},
"runtimeVersion": "appVersion",
"orientation": "default",
"icon": "./assets/logo192noa.png",
"icon": "./assets/ImEXlogo192noa.png",
"platforms": ["ios", "android"],
"ios": {
"supportsTablet": true,
@@ -38,11 +38,11 @@
]
},
"splash": {
"image": "./assets/splash.png",
"image": "./assets/ImEXsplash.png",
"backgroundColor": "#efefef"
},
"notification": {
"icon": "./assets/logo192noa.png"
"icon": "./assets/ImEXNotificationIcon.png"
},
"updates": {
"fallbackToCacheTimeout": 0,
@@ -50,7 +50,7 @@
},
"assetBundlePatterns": ["**/*"],
"web": {
"favicon": "./assets/logo192noa.png",
"favicon": "./assets/ImEXlogo192noa.png",
"config": {
"firebase": {
"apiKey": "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU",

View File

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

BIN
assets/ImEXlogo192noa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
assets/RomeIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
assets/RomeOnlineIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
assets/RomeSplash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>253497221485-qgnj5ve8q0gk2jsmsbsf8qh1i8q04enq.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.253497221485-qgnj5ve8q0gk2jsmsbsf8qh1i8q04enq</string>
<key>API_KEY</key>
<string>AIzaSyAVKJ2eHZpKxsA0a3qyZImg-ePfuwcuCrE</string>
<key>GCM_SENDER_ID</key>
<string>253497221485</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.imex.imexmobile</string>
<key>PROJECT_ID</key>
<string>imex-prod</string>
<key>STORAGE_BUCKET</key>
<string>imex-prod.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:253497221485:ios:fcbe67f6c6f7da68227a64</string>
<key>DATABASE_URL</key>
<string>https://imex-prod.firebaseio.com</string>
</dict>
</plist>

View File

@@ -0,0 +1,47 @@
{
"project_info": {
"project_number": "253497221485",
"firebase_url": "https://imex-prod.firebaseio.com",
"project_id": "imex-prod",
"storage_bucket": "imex-prod.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:253497221485:android:c48f224bc1afd537227a64",
"android_client_info": {
"package_name": "com.imex.imexmobile"
}
},
"oauth_client": [
{
"client_id": "253497221485-1tjt8aflekk0s4d1jibd8p7cbtkoocv1.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDfmdrww4t6cnHbB4yNpJv0qLLRTwzIyUs"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "253497221485-1tjt8aflekk0s4d1jibd8p7cbtkoocv1.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "253497221485-qgnj5ve8q0gk2jsmsbsf8qh1i8q04enq.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.imex.imexmobile"
}
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>147786367145-edt1dv440bco2afusuull5jci42k81v1.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.147786367145-edt1dv440bco2afusuull5jci42k81v1</string>
<key>API_KEY</key>
<string>AIzaSyAGI0-1kPaUR-OnmneKZArgnVBYSLuCqlM</string>
<key>GCM_SENDER_ID</key>
<string>147786367145</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.rome.mobile</string>
<key>PROJECT_ID</key>
<string>rome-prod-1</string>
<key>STORAGE_BUCKET</key>
<string>rome-prod-1.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:147786367145:ios:ebd3eaac9ad3c2d4a8a9b8</string>
</dict>
</plist>

View File

@@ -0,0 +1,46 @@
{
"project_info": {
"project_number": "147786367145",
"project_id": "rome-prod-1",
"storage_bucket": "rome-prod-1.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:147786367145:android:61ff82f70f6089eca8a9b8",
"android_client_info": {
"package_name": "com.rome.mobile"
}
},
"oauth_client": [
{
"client_id": "147786367145-hsl7bgapakau6ook4cuphu436hqub6dp.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyD6_8MQKo4iGtMLmNHq-oLnVns77Aph5a8"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "147786367145-hsl7bgapakau6ook4cuphu436hqub6dp.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "147786367145-edt1dv440bco2afusuull5jci42k81v1.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.rome.mobile"
}
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@@ -22,14 +22,44 @@
},
"test": {
"channel": "test",
// "android": {
// "buildType": "apk"
// },
"autoIncrement": true
},
"production": {
"channel": "production",
"autoIncrement": true
},
"rome-development": {
"developmentClient": true,
"channel": "test",
"distribution": "internal",
"ios": {},
"autoIncrement": true,
"env": {
"APP_VARIANT": "ROME"
}
},
"rome-development-simulator": {
"developmentClient": true,
"channel": "test",
"distribution": "internal",
"ios": {
"simulator": true
},
"autoIncrement": true,
"env": {
"APP_VARIANT": "ROME"
}
},
"rome-test": {
"channel": "test",
"autoIncrement": true
},
"rome-production": {
"channel": "production",
"autoIncrement": true,
"env": {
"APP_VARIANT": "ROME"
}
}
},
"submit": {

47
env.js
View File

@@ -5,11 +5,6 @@ const ENV = {
API_URL: "https://api.test.imex.online",
uri: "https://db.test.bodyshop.app/v1/graphql",
wsuri: "wss://db.test.bodyshop.app/v1/graphql",
REACT_APP_CLOUDINARY_ENDPOINT_API:
"https://api.cloudinary.com/v1_1/bodyshop",
REACT_APP_CLOUDINARY_ENDPOINT: "https://res.cloudinary.com/bodyshop",
REACT_APP_CLOUDINARY_API_KEY: "473322739956866",
REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS: "c_fill,h_250,w_250",
SPLIT_API: "ts615lqgnmk84thn72uk18uu5pgce6e0l4rc",
firebase: {
apiKey: "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c",
@@ -26,12 +21,6 @@ const ENV = {
API_URL: "https://api.imex.online",
uri: "https://db.imex.online/v1/graphql",
wsuri: "wss://db.imex.online/v1/graphql",
REACT_APP_CLOUDINARY_ENDPOINT_API:
"https://api.cloudinary.com/v1_1/bodyshop",
REACT_APP_CLOUDINARY_ENDPOINT: "https://res.cloudinary.com/bodyshop",
REACT_APP_CLOUDINARY_API_KEY: "473322739956866",
SPLIT_API: "et9pjkik6bn67he5evpmpr1agoo7gactphgk",
REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS: "c_fill,h_250,w_250",
firebase: {
apiKey: "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU",
authDomain: "imex-prod.firebaseapp.com",
@@ -43,11 +32,41 @@ const ENV = {
measurementId: "G-NTWBKG2L0M",
},
},
"rometest": {
API_URL: "https://api.test.romeonline.io",
uri: "https://db.test.romeonline.io/v1/graphql",
wsuri: "wss://db.test.romeonline.io/v1/graphql",
firebase: {
apiKey: "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE",
authDomain: "rome-prod-1.firebaseapp.com",
projectId: "rome-prod-1",
storageBucket: "rome-prod-1.appspot.com",
messagingSenderId: "147786367145",
appId: "1:147786367145:web:9d4cba68071c3f29a8a9b8",
measurementId: "G-G8Z9DRHTZS",
},
},
"romeprod": {
API_URL: "https://api.romeonline.io",
uri: "https://db.romeonline.io/v1/graphql",
wsuri: "wss://db.romeonline.io/v1/graphql",
firebase: {
apiKey: "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE",
authDomain: "rome-prod-1.firebaseapp.com",
projectId: "rome-prod-1",
storageBucket: "rome-prod-1.appspot.com",
messagingSenderId: "147786367145",
appId: "1:147786367145:web:9d4cba68071c3f29a8a9b8",
measurementId: "G-G8Z9DRHTZS",
},
}
};
const IS_ROME = process.env.APP_VARIANT === 'ROME';
function getEnvVars() {
if (Updates.channel !== "production") return ENV.test;
else return ENV.prod;
if (Updates.channel !== "production") return IS_ROME ? ENV.rometest : ENV.test;
else return IS_ROME ? ENV.romeprod : ENV.prod;
}
console.log(IS_ROME, process.env, "ENV: ", getEnvVars());
export default getEnvVars();

View File

@@ -4,11 +4,14 @@
"version": "1.0.0",
"main": "expo-router/entry",
"scripts": {
"start": "expo start",
"start": "expo start --clear",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject",
"setup:imex": "cp configs/imex/google-services.json ./google-services.json && cp configs/imex/GoogleService-Info.plist ./GoogleService-Info.plist",
"setup:rome": "cp configs/rome/google-services.json ./google-services.json && cp configs/rome/GoogleService-Info.plist ./GoogleService-Info.plist",
"start:imex": "npm run setup:imex && APP_VARIANT=IMEX npm start",
"start:rome": "npm run setup:rome && APP_VARIANT=ROME npm start",
"release:test": "expo publish --release-channel test",
"release:production": "expo publish --release-channel production",
"build:production": "eas build --profile production",