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 flag to emit build meta #2451

Merged
merged 5 commits into from
Jul 15, 2024

Conversation

rainst
Copy link
Contributor

@rainst rainst commented Jul 8, 2024

Why

Currently Bugsnag doesn't support automatic source map upload after running eas update so I made a script that makes a manual submission after bundling and submitting an update. The script is relying on eas-update-metadata.json to obtain the bundle ids.

I am currently using [email protected] and the update script is working well, but I have realised that this feature was removed with the v7 release thus preventing me from updating to a newer version of eas-cli.

How

This feature was introduced in #2158 and removed in #2187, so I have reverted the changes and put the feature behind the --emit-build-meta --emit-metadata flag rather than having it aways on so nothing will change for people that don't really need it.

Test Plan

I have tested with my update pipeline script and it works as expected.

  • Run eas update --emit-metadata and in the dist folder there should be eas-update-metadata.json with the following shape:
{
  "updates": [
    {
      "id": "f3021b72-f530-4ce6-94eb-4441b0bb237f",
      "createdAt": "2024-07-08T06:07:00.573Z",
      "group": "f889ce3d-3a8e-4415-98f5-23232",
      "branch": "main",
      "message": "test",
      "runtimeVersion": "1.23.1",
      "platform": "android",
      "manifestPermalink": "https://u.expo.dev/update/f3021b72-f530-4ce6-94eb-4441b0bb237f",
      "isRollBackToEmbedded": false,
      "gitCommitHash": "00e36199b3c15ad2df049f9f5d9a03bc32dfeb03"
    },
    {
      "id": "a1f730fa-cac2-4a08-b157-b44415af3c724",
      "createdAt": "2024-07-08T06:07:00.573Z",
      "group": "f889ce3d-3a8e-4415-98f5-f3232395fc725",
      "branch": "main",
      "message": "test",
      "runtimeVersion": "1.23.1",
      "platform": "ios",
      "manifestPermalink": "https://u.expo.dev/update/a1f730fa-cac2-4a08-b157-b44415af3c724",
      "isRollBackToEmbedded": false,
      "gitCommitHash": "00e36199b3c15ad2df049f9f5d9a03bc32dfeb03"
    }
  ]
}
  • The file should not be emitted when running eas update without the --emit-metadata flag
  • When the --skip-bundler flag is set a warning will notify the user that --emit-metadata will be ignored because not applicable

@rainst rainst changed the title Add flag to emit build meta [eas-cli] Add flag to emit build meta Jul 8, 2024
@szdziedzic szdziedzic requested a review from quinlanj July 8, 2024 10:32
Copy link
Member

@wschurman wschurman left a comment

Choose a reason for hiding this comment

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

Just a few changes (noted inline). Main one is to remove the term "build" from this since, in the context of EAS CLI, "build" means something very different (EAS build).

I'm definitely all for re-adding this back in though.

packages/eas-cli/README.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
packages/eas-cli/src/commands/update/index.ts Outdated Show resolved Hide resolved
packages/eas-cli/src/commands/update/index.ts Outdated Show resolved Hide resolved
@rainst rainst force-pushed the add-flag-to-emit-build-meta branch 2 times, most recently from 97cc87e to 43ab7de Compare July 10, 2024 23:41
@rainst rainst requested a review from wschurman July 10, 2024 23:52
@rainst
Copy link
Contributor Author

rainst commented Jul 10, 2024

@wschurman I have applied all the suggested changes, please let me know if I missed anything

applied change suggestions
@rainst rainst force-pushed the add-flag-to-emit-build-meta branch from 43ab7de to 5cc6578 Compare July 11, 2024 06:48
Copy link
Member

@wschurman wschurman left a comment

Choose a reason for hiding this comment

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

Couple more changes, otherwise looks good. I'll merge after the changes are made.

packages/eas-cli/src/commands/update/index.ts Outdated Show resolved Hide resolved
packages/eas-cli/src/commands/update/index.ts Outdated Show resolved Hide resolved
Copy link
Member

@quinlanj quinlanj left a comment

Choose a reason for hiding this comment

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

lgtm. happy to add this feature back behind a flag :)

@rainst
Copy link
Contributor Author

rainst commented Jul 13, 2024

@wschurman I have committed your changes and replaced all the occurrences of the old variable with the new one. There shouldn't be any build mention left now :)

Thank you @quinlanj for reviewing!

@rainst rainst requested a review from wschurman July 13, 2024 06:23
@wschurman wschurman merged commit c0651a8 into expo:main Jul 15, 2024
5 of 6 checks passed
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.

3 participants