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] add build-profile flag #2966

Merged
merged 3 commits into from
Mar 27, 2025
Merged

Conversation

quinlanj
Copy link
Member

@quinlanj quinlanj commented Mar 26, 2025

Why

Add --build-profile arg to eas fingerprint:generate, based on the discussion here: https://exponent-internal.slack.com/archives/C06EFBQK3B7/p1742589956539759?thread_ts=1741971771.992309&cid=C06EFBQK3B7

How

  • Added a new --build-profile flag to specify a build profile from eas.json
  • Added a --environment flag to use environment variables from a specific environment
  • Made these flags mutually exclusive
  • Updated the command examples to reflect the new options
  • Implemented the logic to load environment variables from either the specified build profile or environment
  • Updated the context options to include dynamic project configuration

Test Plan

  • Confirmed env vars (defined server side and in the 'env' field of eas.json) get passed in. EXPO_STAGING=1 ~/Documents/eas-cli/packages/eas-cli/bin/run fingerprint:generate --build-profile production
  • Confirmed --environment and --build-profile are mutually exclusive: EXPO_DEBUG=1 EXPO_STAGING=1 ~/Documents/eas-cli/packages/eas-cli/bin/run fingerprint:generate --build-profile production --environment production

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

github-actions bot commented Mar 26, 2025

Size Change: -2.07 kB (0%)

Total Size: 53.5 MB

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

compressed-size-action

Copy link

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 31.25000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 52.61%. Comparing base (56f0f77) to head (e731f1d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...kages/eas-cli/src/commands/fingerprint/generate.ts 31.25% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2966      +/-   ##
==========================================
- Coverage   52.62%   52.61%   -0.01%     
==========================================
  Files         590      590              
  Lines       23329    23340      +11     
  Branches     4643     4644       +1     
==========================================
+ Hits        12274    12277       +3     
- Misses      11021    11029       +8     
  Partials       34       34              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

getProjectConfig: getDynamicPrivateProjectConfigAsync,
opts: { env: buildProfile.profile.env },
});
env = configResult.env;
Copy link
Member Author

Choose a reason for hiding this comment

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

I've skipped adding EXPO_NO_DOTENV: '1' in this case to keep it consistent with eas build. Additional reasoning:

  • eas.json may not define server side variables, in which case we'd want to use .env to get env vars
  • will leave it to the user to define EXPO_NO_DOTENV in eas.json as it is not clear what type of env var system they are using.

@quinlanj quinlanj requested review from wschurman and sjchmiela March 26, 2025 23:36
@quinlanj quinlanj marked this pull request as ready for review March 26, 2025 23:36
Copy link

Subscribed to pull request

File Patterns Mentions
**/* @szdziedzic, @khamilowicz, @sjchmiela, @radoslawkrzemien

Generated by CodeMention

@quinlanj quinlanj force-pushed the 03-26-_eas-cli_add_build-profile_flag branch from 6bac26d to e731f1d Compare March 27, 2025 23:23
@quinlanj quinlanj merged commit 2816b43 into main Mar 27, 2025
10 checks passed
@quinlanj quinlanj deleted the 03-26-_eas-cli_add_build-profile_flag branch March 27, 2025 23:30
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