Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eas-cli] Pass env from process.env and build profile to expo-updates CLI calls where applicable #2359

Merged
merged 3 commits into from
May 6, 2024

Conversation

wschurman
Copy link
Member

Why

This is the eas-cli equivalent of expo/eas-build#388.

Essentially, when getting the project config in expo-updates CLI, the env must be supplied.

How

Pass the env to the spawnAsync. Note that this passes the build profile env when possible as well (only in build command).

Test Plan

Still need to come up with a test plan here. I think it will be:

  1. Create a test app with an app.config.ts similar to https://github.com/expo/expo/blob/main/apps/eas-expo-go/app.config.ts and expo-updates installed (beta). (yarn create expo-app --template default@beta)
  2. eas init, eas update:configure, eas build:configure
  3. Add environment variable to eas.json env key in each profile.
  4. Run eas build -p android, see it fails (current prod version of eas-cli)
  5. Run neas build -p android, see it succeeds.

@wschurman
Copy link
Member Author

/changelog-entry bug-fix Pass env from process.env and build profile to expo-updates CLI calls where applicable

Copy link

github-actions bot commented May 3, 2024

Size Change: +1.29 kB (0%)

Total Size: 51.3 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 51.3 MB +1.29 kB (0%)

compressed-size-action

Copy link

github-actions bot commented May 3, 2024

✅ Thank you for adding the changelog entry!

Copy link

codecov bot commented May 3, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 53.83%. Comparing base (d54abee) to head (b099418).

Files Patch % Lines
packages/eas-cli/src/build/metadata.ts 0.00% 2 Missing ⚠️
packages/eas-cli/src/commands/build/configure.ts 0.00% 2 Missing ⚠️
...ckages/eas-cli/src/update/android/UpdatesModule.ts 33.34% 2 Missing ⚠️
packages/eas-cli/src/update/configure.ts 33.34% 2 Missing ⚠️
packages/eas-cli/src/update/ios/UpdatesModule.ts 33.34% 2 Missing ⚠️
packages/eas-cli/src/utils/expoUpdatesCli.ts 33.34% 2 Missing ⚠️
...-cli/src/build/android/syncProjectConfiguration.ts 50.00% 1 Missing ⚠️
.../eas-cli/src/build/ios/syncProjectConfiguration.ts 50.00% 1 Missing ⚠️
packages/eas-cli/src/project/publish.ts 50.00% 1 Missing ⚠️
.../eas-cli/src/project/resolveRuntimeVersionAsync.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2359      +/-   ##
==========================================
- Coverage   53.84%   53.83%   -0.00%     
==========================================
  Files         525      525              
  Lines       19273    19275       +2     
  Branches     4073     4074       +1     
==========================================
  Hits        10375    10375              
- Misses       8178     8180       +2     
  Partials      720      720              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@szdziedzic szdziedzic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks reasonable, thanks!

@wschurman wschurman merged commit 41622c0 into main May 6, 2024
9 checks passed
@wschurman wschurman deleted the @wschurman/expo-updates-cli-env branch May 6, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants