Hello,
I’m using EAS to build and submit my application on several store (IOS / Android).
So, in my eas.json
file I made 3 différent profile with different app name / slug and bundle :
{
"build": {
"base": { ... },
"preproduction": {
"extends": "base",
"env": {
"APP_NAME": "App",
"APP_SLUG": "App",
"IOS_BUNDLE_NAME": "com.app.mobileapp",
"ANDROID_BUNDLE_NAME": "com.app.mobileapp"
}
},
"preproduction-internal-preprod": {
"extends": "base",
"env": {
"APP_NAME": "App-PPROD",
"APP_SLUG": "App-PPROD",
"IOS_BUNDLE_NAME": "com.firm.app.preprod",
"ANDROID_BUNDLE_NAME": "com.firm.app.preprod"
}
},
"preproduction-internal-dev": {
"extends": "base",
"env": {
"APP_NAME": "App-DEV",
"APP_SLUG": "App-DEV",
"IOS_BUNDLE_NAME": "com.firm.app.dev",
"ANDROID_BUNDLE_NAME": "com.firm.app.dev"
}
}
},
"submit": {
"preproduction": {
"android": {
"serviceAccountKeyPath": "./key.json",
"releaseStatus": "completed",
"track": "internal"
},
"ios": {
"appleId": "...",
"ascAppId": "...",
"appleTeamId": "..."
}
},
"preproduction-internal-preprod": {
"android": {
"serviceAccountKeyPath": "./key.json",
"releaseStatus": "completed",
"track": "internal"
},
"ios": {
"appleId": "...",
"ascAppId": "...",
"appleTeamId": "..."
}
},
"preproduction-internal-dev": {
"android": {
"serviceAccountKeyPath": "./key.json",
"releaseStatus": "completed",
"track": "internal"
},
"ios": {
"appleId": "...",
"ascAppId": "...",
"appleTeamId": "..."
}
}
}
}
In my app.config.json
file I get the informations with process.env
:
name: process.env.APP_NAME || 'App',
slug: process.env.APP_SLUG || 'App',
When i execute my build with this command : eas build -p ios --profile preproduction-internal-dev --non-interactive
, there is no problem, the build works and get the env variables from eas.json
file.
Same with my others profiles.
But when I submit my application with this command : eas submit -p ios --profile preproduction-internal-dev
The app.config.json
doesn’t took the env variables from eas.json
and place my default values.
Is there a way to get the env variable of the eas.json
file when submiting the build ?
Thanks