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][eas-json] add updates.channel to build metadata #461

Merged
merged 2 commits into from
Jun 21, 2021

Conversation

jkhales
Copy link
Contributor

@jkhales jkhales commented Jun 16, 2021

Checklist

  • I've added an entry to CHANGELOG.md if necessary.
  • I've tagged the changelog entry with [EAS BUILD API] if it's a part of a breaking change to EAS Build API (only possible when updating @expo/eas-build-job package).

Why

This is a follow up PR to: expo/eas-build#24 as discussed: expo/eas-build#24 (comment)

Used #413 as reference.

How

Added readChannelSafelyAsync

If both channel and releaseChannel are defined, a warning is logged and we default to channel.

Test Plan

  • Added unit tests.
  • built ios/android on staging and confirmed that the metadata contained a channel if specified.

@linear
Copy link

linear bot commented Jun 16, 2021

ENG-1177 Add 'channel' to eas-cli

Follow this PR as an outline: #413

Also consult this PR used to test the eas-build-job PR: https://github.com/expo/eas-cli/compare/@jkhales/companion-test-branch

@jkhales jkhales changed the title Jonathan/eng 1177 add channel to eas cli [eas-cli][eas-json] add channel to build metadata Jun 16, 2021
@jkhales jkhales force-pushed the jonathan/eng-1177-add-channel-to-eas-cli branch from 0866ee1 to 33c1bd2 Compare June 16, 2021 15:54
@jkhales jkhales requested review from dsokal and wkozyra95 June 16, 2021 15:55
@jkhales jkhales marked this pull request as ready for review June 16, 2021 16:01
@jkhales jkhales force-pushed the jonathan/eng-1177-add-channel-to-eas-cli branch from a46fcca to 94d8588 Compare June 16, 2021 16:05
Copy link
Contributor

@wkozyra95 wkozyra95 left a comment

Choose a reason for hiding this comment

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

if you are adding this field to eas.json I would expect to also support it in job object not only in metadata, to do that you need to

CHANGELOG.md Outdated Show resolved Hide resolved
]);
if (channel && releaseChannel) {
Log.warn(
`Both channel: "${channel}" and releaseChannel: "${releaseChannel}" are defined. Defaulting to channel.`
Copy link
Contributor

@wkozyra95 wkozyra95 Jun 17, 2021

Choose a reason for hiding this comment

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

  • This is just resolving metadata, it should not trigger any warnings

  • I'm not sure if it's correct behaviour e.g.

    • if you have release channel specified in Expo.plist and channel in eas.json it should add it should use channel
    • if you have channel specified in Expo.plist and release channel in eas.json it should add it should use releaseChannel

    I suggest creating one resolve function, sth like this

if (!installed)  ...
if (buildProfile.channel) ...
if (buildProfile.releasChannel) ...
if (channelForNativeConfig) ...
if (releaseChannelFromNativeConfig) ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I like that.

@@ -34,7 +34,6 @@ interface CommonJobProperties {
platform: Platform.IOS;
projectArchive: ArchiveSource;
builderEnvironment: Ios.BuilderEnvironment;
releaseChannel?: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jkhales
Copy link
Contributor Author

jkhales commented Jun 18, 2021

if you are adding this field to eas.json I would expect to also support it in job object not only in metadata, to do that you need to

Thanks! After discussing in https://exponent-internal.slack.com/archives/C013ZK4SA12/p1624029512114600 going to hold off on updating the docs till we are ready to release EAS Updates publicly. Made a linear issue for it: https://linear.app/expo/issue/ENG-1383/document-updateschannel-in-eas-json

@jkhales jkhales requested a review from wkozyra95 June 18, 2021 15:03
CHANGELOG.md Outdated
@@ -12,6 +12,7 @@ This is the log of notable changes to EAS CLI and related packages.
### 🎉 New features

- Make credentials manager work with multi-target iOS projects. ([#441](https://github.com/expo/eas-cli/pull/441) by [@dsokal](https://github.com/dsokal))
- Add `channel` to build metadata. ([#461](https://github.com/expo/eas-cli/pull/461) by [@jkhales](https://github.com/jkhales))
Copy link
Contributor

Choose a reason for hiding this comment

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

update description

@jkhales jkhales changed the title [eas-cli][eas-json] add channel to build metadata [eas-cli][eas-json] add updates.channel to build metadata Jun 21, 2021
@jkhales jkhales force-pushed the jonathan/eng-1177-add-channel-to-eas-cli branch from 20911d2 to 5c74671 Compare June 21, 2021 12:09
@github-actions
Copy link

Size Change: +447 B (0%)

Total Size: 37.6 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 37.6 MB +447 B (0%)

compressed-size-action

@jkhales jkhales merged commit be6a7f5 into main Jun 21, 2021
@jkhales jkhales deleted the jonathan/eng-1177-add-channel-to-eas-cli branch June 21, 2021 17:29
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