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] use new android build credentials provider #427

Merged
merged 4 commits into from
Jun 1, 2021

Conversation

quinlanj
Copy link
Member

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

Replace the old Android SetupBuildCredentials with the new one

Test Plan

  • current tests still pass

@quinlanj quinlanj requested review from dsokal and wkozyra95 May 27, 2021 01:51
@github-actions
Copy link

github-actions bot commented May 27, 2021

Size Change: +473 B (0%)

Total Size: 37.5 MB

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

compressed-size-action

projectName: ctx.commandCtx.projectName,
accountName: ctx.commandCtx.accountName,
androidApplicationIdentifier: nullthrows(
Copy link
Contributor

Choose a reason for hiding this comment

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

This value from app.json is not correct for generic projects. Actually, we even print a warning if someone is building a generic project and they have android.package defined in their app.json (see https://github.com/expo/eas-cli/blob/main/packages/eas-cli/src/project/android/applicationId.ts#L35). For generic, we read the application id from native code.

Take a look at line 70 in this file and use the value returned by the getOrConfigureApplicationIdAsync function.

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch, thanks 🙏

@@ -113,14 +115,22 @@ async function ensureAndroidCredentialsAsync(
if (!shouldProvideCredentials(ctx)) {
return;
}
const androidApplicationIdentifier = await getOrConfigureApplicationIdAsync(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const androidApplicationIdentifier = await getOrConfigureApplicationIdAsync(
const androidApplicationIdentifier = getApplicationId(

This change is related to #431 (comment)
The application id must be already configured in this context.

Copy link
Contributor

@dsokal dsokal May 28, 2021

Choose a reason for hiding this comment

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

Sorry for making you change it again but in https://github.com/expo/eas-cli/pull/427/files/887877aaf9874f6b77a09f3c8632456d54f98355#r640438388 I meant to use the result of the call on line 70.
However, when I was reviewing #431 I realized that we should change the name (and behavior) of getOrConfigureApplicationIdAsync 😅

@quinlanj quinlanj force-pushed the @quin/useNewBuildCreds branch from 23c391b to 9ac5688 Compare June 1, 2021 18:34
@quinlanj quinlanj merged commit 81e6280 into main Jun 1, 2021
@quinlanj quinlanj deleted the @quin/useNewBuildCreds branch June 1, 2021 18:56
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