Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,13 @@ describe(WorkflowLogView, () => {
createdAt: '2022-01-01T00:00:00.000Z',
updatedAt: '2022-01-01T00:00:00.000Z',
isForIosSimulator: false,
project: {
app: {
id: mockProjectId,
__typename: 'App',
name: 'App',
slug: 'app',
ownerAccount: {
id: 'account-id',
name: 'account-name',
__typename: 'Account',
},
},
platform: AppPlatform.Android,
Expand Down
4 changes: 1 addition & 3 deletions packages/eas-cli/src/build/__tests__/cancel-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,11 @@ function createMockBuildFragment({
id: buildId ?? uuid(),
logFiles: [],
priority: BuildPriority.Normal,
project: {
__typename: 'App',
app: {
slug: 'test-project',
id: projectId,
name: 'test-project',
ownerAccount: {
__typename: 'Account',
id: uuid(),
name: 'test-account',
},
Expand Down
4 changes: 1 addition & 3 deletions packages/eas-cli/src/build/__tests__/delete-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,11 @@ function createMockBuildFragment({
platform: AppPlatform.Android,
id: buildId ?? uuid(),
priority: BuildPriority.Normal,
project: {
__typename: 'App',
app: {
slug: 'test-project',
id: projectId,
name: 'test-project',
ownerAccount: {
__typename: 'Account',
id: uuid(),
name: 'test-account',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/eas-cli/src/build/runBuildAndSubmit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ export async function downloadAndRunAsync(
simulator?: SimulatorRunTarget
): Promise<void> {
assert(build.artifacts?.applicationArchiveUrl);
const cachedAppPath = getEasBuildRunCachedAppPath(build.project.id, build.id, build.platform);
const cachedAppPath = getEasBuildRunCachedAppPath(build.app.id, build.id, build.platform);

if (await pathExists(cachedAppPath)) {
Log.newLine();
Expand Down
13 changes: 5 additions & 8 deletions packages/eas-cli/src/build/utils/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ export function getProjectDashboardUrl(accountName: string, projectName: string)
}

export function getBuildLogsUrl(build: BuildFragment, hash?: string): string {
const { project } = build;
const url =
project.__typename !== 'App'
? `/builds/${build.id}`
: `/accounts/${project.ownerAccount.name}/projects/${project.slug}/builds/${build.id}${
hash ? `#${hash}` : ''
}`;
const { app } = build;
const url = `/accounts/${app.ownerAccount.name}/projects/${app.slug}/builds/${build.id}${
hash ? `#${hash}` : ''
}`;

return new URL(url, getExpoWebsiteBaseUrl()).toString();
}
Expand All @@ -29,7 +26,7 @@ export function getArtifactUrl(artifactId: string): string {
export function getInternalDistributionInstallUrl(build: BuildFragment): string {
if (build.platform === AppPlatform.Ios) {
return `itms-services://?action=download-manifest;url=${getExpoApiBaseUrl()}/v2/projects/${
build.project.id
build.app.id
}/builds/${build.id}/manifest.plist`;
}

Expand Down
6 changes: 3 additions & 3 deletions packages/eas-cli/src/commands/build/cancel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ async function cancelBuildAsync(
.mutation<CancelBuildMutation, CancelBuildMutationVariables>(
gql`
mutation CancelBuildMutation($buildId: ID!) {
build(buildId: $buildId) {
cancel {
build {
cancelBuild(buildId: $buildId) {
id
status
}
Expand All @@ -39,7 +39,7 @@ async function cancelBuildAsync(
)
.toPromise()
);
return data.build.cancel;
return data.build.cancelBuild;
}

export async function selectBuildToCancelAsync(
Expand Down
2 changes: 1 addition & 1 deletion packages/eas-cli/src/commands/build/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export default class Download extends EasCommand {

async getPathToBuildArtifactAsync(build: BuildFragment, platform: AppPlatform): Promise<string> {
const cachedBuildArtifactPath = getEasBuildRunCachedAppPath(
build.project.id,
build.app.id,
build.id,
platform
);
Expand Down
32 changes: 16 additions & 16 deletions packages/eas-cli/src/graphql/generated.ts

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions packages/eas-cli/src/graphql/types/Build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,13 @@ export const BuildFragmentNode = gql`
displayName
}
logFiles
project {
__typename
app {
id
name
slug
... on App {
ownerAccount {
id
name
}
ownerAccount {
id
name
}
}
channel
Expand Down
Loading