Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
[cli] Use exact @expo/eas-build-job version, update it, and fix relat…
Browse files Browse the repository at this point in the history
…ed TS errors (#2850)
  • Loading branch information
brentvatne authored Nov 3, 2020
1 parent 2a89b3c commit 22dea6d
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/expo-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"@expo/bunyan": "3.0.2",
"@expo/config": "3.3.12",
"@expo/dev-tools": "0.13.56",
"@expo/eas-build-job": "^0.1.1",
"@expo/eas-build-job": "0.1.2",
"@expo/json-file": "8.2.24",
"@expo/package-manager": "0.0.33",
"@expo/plist": "0.0.10",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AndroidConfig } from '@expo/config';
import { Android, BuildType, Job, Platform, sanitizeJob } from '@expo/eas-build-job';
import { Android, Job, Platform, sanitizeJob, Workflow } from '@expo/eas-build-job';
import path from 'path';

import CommandError from '../../../../CommandError';
Expand All @@ -11,7 +11,6 @@ import {
AndroidGenericBuildProfile,
AndroidManagedBuildProfile,
CredentialsSource,
Workflow,
} from '../../../../easJson';
import { gitAddAsync, gitRootDirectory } from '../../../../git';
import { Builder, BuilderContext } from '../../types';
Expand Down Expand Up @@ -169,7 +168,7 @@ class AndroidBuilder implements Builder<Platform.Android> {
const projectRootDirectory = path.relative(await gitRootDirectory(), process.cwd()) || '.';
return {
...(await this.prepareJobCommonAsync(archiveUrl)),
type: BuildType.Generic,
type: Workflow.Generic,
gradleCommand: buildProfile.gradleCommand,
artifactPath: buildProfile.artifactPath,
releaseChannel: buildProfile.releaseChannel,
Expand All @@ -183,9 +182,7 @@ class AndroidBuilder implements Builder<Platform.Android> {
): Promise<Partial<Android.ManagedJob>> {
return {
...(await this.prepareJobCommonAsync(archiveUrl)),
type: BuildType.Managed,
packageJson: { example: 'packageJson' },
manifest: { example: 'manifest' },
type: Workflow.Managed,
};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IOSConfig } from '@expo/config';
import { BuildType, iOS, Job, Platform, sanitizeJob } from '@expo/eas-build-job';
import { iOS, Job, Platform, sanitizeJob, Workflow } from '@expo/eas-build-job';
import sortBy from 'lodash/sortBy';
import path from 'path';

Expand All @@ -12,7 +12,6 @@ import {
CredentialsSource,
iOSGenericBuildProfile,
iOSManagedBuildProfile,
Workflow,
} from '../../../../easJson';
import { gitRootDirectory } from '../../../../git';
import log from '../../../../log';
Expand Down Expand Up @@ -194,7 +193,7 @@ class iOSBuilder implements Builder<Platform.iOS> {
const projectRootDirectory = path.relative(await gitRootDirectory(), process.cwd()) || '.';
return {
...(await this.prepareJobCommonAsync(archiveUrl)),
type: BuildType.Generic,
type: Workflow.Generic,
scheme: this.scheme,
artifactPath: buildProfile.artifactPath,
releaseChannel: buildProfile.releaseChannel,
Expand All @@ -208,9 +207,7 @@ class iOSBuilder implements Builder<Platform.iOS> {
): Promise<Partial<iOS.ManagedJob>> {
return {
...(await this.prepareJobCommonAsync(archiveUrl)),
type: BuildType.Managed,
packageJson: { example: 'packageJson' },
manifest: { example: 'manifest' },
type: Workflow.Managed,
};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Workflow } from '@expo/eas-build-job';

import CommandError from '../../../CommandError';
import { CredentialsProvider } from '../../../credentials/provider';
import { CredentialsSource, Workflow } from '../../../easJson';
import { CredentialsSource } from '../../../easJson';
import log from '../../../log';
import prompts from '../../../prompts';
import { platformDisplayNames } from '../constants';
Expand Down
4 changes: 3 additions & 1 deletion packages/expo-cli/src/commands/eas-build/build/metadata.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { CredentialsSource, Workflow } from '../../../easJson';
import { Workflow } from '@expo/eas-build-job';

import { CredentialsSource } from '../../../easJson';
import { BuilderContext, Platform, TrackingContext } from '../types';

/**
Expand Down
11 changes: 1 addition & 10 deletions packages/expo-cli/src/easJson.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
import { Platform } from '@expo/eas-build-job';
import { Platform, Workflow } from '@expo/eas-build-job';
import Joi from '@hapi/joi';
import fs from 'fs-extra';
import path from 'path';

// TODO(wkozyra95): move it to @expo/config or to separate package

// Workflow is representing different value than BuildType from @expo/eas-build-job
// Each workflow has a set of BuildTypes available
// - Generic workflow allows to build 'generic' and 'generic-client'
// - Managed workflow allows to build 'managed' and 'managed-client'
export enum Workflow {
Generic = 'generic',
Managed = 'managed',
}

export enum CredentialsSource {
LOCAL = 'local',
REMOTE = 'remote',
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1423,10 +1423,10 @@
xcode "^3.0.0"
xml-js "^1.6.11"

"@expo/eas-build-job@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-0.1.1.tgz#7b71f87ac57192ba03613e18fb0fd5f639d21b6d"
integrity sha512-V5zrRdz6qa45Aflh84CmsEyNcNHG95O7dyzQqpzEI73phB+Jr7ffM+AP0f3+POjy6mwNXIKHgbzH8VG3excPpA==
"@expo/eas-build-job@0.1.2":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-0.1.2.tgz#104b9bcb1602a23aabf893506e8e55d0dc61cd79"
integrity sha512-hBYVWlEWi8Iu+jWmbzKy2bMsYoWvRwY7MZ+SdKpNvAl+sMpp8rwvxRyRs7cRTa6DuiQ2sdOxqemnw9MJ6S5cRA==
dependencies:
"@hapi/joi" "^17.1.1"

Expand Down

0 comments on commit 22dea6d

Please sign in to comment.