-
Notifications
You must be signed in to change notification settings - Fork 85
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
Conversation
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 |
0866ee1
to
33c1bd2
Compare
a46fcca
to
94d8588
Compare
There was a problem hiding this 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
- update @expo/eas-build-job to version that have your changes from previous PR
- add
updates: { channel: buildProfile.channel }
in https://github.com/expo/eas-cli/blob/main/packages/eas-cli/src/build/android/prepareJob.ts#L95 (there are 4 places like that) - add
updates: job.updates
in https://github.com/expo/eas-cli/blob/main/packages/eas-cli/src/build/android/graphql.ts#L15 - update docs https://docs.expo.io/build/eas-json/
]); | ||
if (channel && releaseChannel) { | ||
Log.warn( | ||
`Both channel: "${channel}" and releaseChannel: "${releaseChannel}" are defined. Defaulting to channel.` |
There was a problem hiding this comment.
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 you have release channel specified in Expo.plist and channel in eas.json it should add it should use
if (!installed) ...
if (buildProfile.channel) ...
if (buildProfile.releasChannel) ...
if (channelForNativeConfig) ...
if (releaseChannelFromNativeConfig) ...
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never defined at this level. And if it was it would be overwritten here: https://github.com/expo/eas-cli/pull/461/files#diff-22985259d1ba471645af133efec17c58e7a80e3244e5c7644a66f02a4b483899L129
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 |
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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update description
20911d2
to
5c74671
Compare
Size Change: +447 B (0%) Total Size: 37.6 MB
|
Checklist
[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