Skip to content

EAS Submit does not take ENV VARs (like APP_VARIANT) from profile or eas.json environment #3010

@dbrekelmans

Description

@dbrekelmans

Build/Submit details page URL

No response

Summary

When running eas submit --profile production, and having eas.json configured with:

"production": {
      "autoIncrement": true,
      "channel": "production",
      "environment": "production"
    }

The command does not take environtment variables configured in the production environment.

For example:

Image

I use process.env.APP_VARIANT in my app.config.ts to determine the bundle identifier, and default to development if the env var is not set. I've noticed in eas submit that the env var is not set, to it submits with my dev bundle identifier.

I think it should work for eas submit in the same way it works for eas build according to https://docs.expo.dev/eas/environment-variables/

Managed or bare?

Managed

Environment

bunx expo-doctor                                                                                                                                                                                                                                                    
env: load .env.local
env: export APP_VARIANT EXPO_PUBLIC_SENTRY_DSN SENTRY_AUTH_TOKEN
15/15 checks passed. No issues detected!

Error output

No response

Reproducible demo or steps to reproduce from a blank project

  1. Set up the APP_VARIANT environment variable in EAS for the production environment
  2. Configure the production profile in eas.json to use the production environment
  3. Determine the bundle identifier in app.config.ts to be based on process.env.APP_VARIANT
  4. Run eas submit --profile production
  5. Observe that the APP_VARIANT environment variable is not set

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reviewIssue is ready to be reviewed by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions