Add more information for dynamic configurations
E
Estanislao Gonzalez
We'd benefit for having more information in the dynamic configuration. As it is now, for build steps, eas.json allows to setup environmental variables, but e.g. submit does not allow that.
This means that all required values need to be passed over env vars while calling the cli in every but the build step (which as mentioned, can be coded into eas.json).
We end up doing something like this:
EAS_BUILD_PROFILE=production npx eas submit -p android --profile production
so we can evaluate the profile in the dynamic configuration. But we are replicating the same info twice (error prone).
It would be preferably if either:
- the cli already set up those values, if not set (EAS_CLI_PROFILE=prodcution, EAS_CLI_ACTION=submit, EAS_CLI_PROFILE=android, etc), so they can be evaluated in app.config.js as required)
- the config passed to app.config.js is extended by those values: module.exports = (config) => {..., extra: {cli: { profile: android, profile: production, action: submit, ... }}}
Thank!
Stanisław Chmiela
Hey Estanislao! Nice to meet a fellow Estanislao in the wild!
Have you by any chance taken a look at EAS Workflows? They make adjusting
env
on the fly, per-job, much easier!As for
EAS_BUILD_PROFILE
I think you may be right it may not be available when evaluating app config in eas build
. Again, eas workflow:run
should fix that — in Workflows app config is evaluated on the VM where EAS_BUILD_PROFILE
should be available.