Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/ENG…
Browse files Browse the repository at this point in the history
…-11843-change-default-appversionsource

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
radoslawkrzemien committed Jun 12, 2024
2 parents faec5e6 + 3817e2d commit aeaa8d1
Show file tree
Hide file tree
Showing 13 changed files with 250 additions and 182 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16', '18', '20']
node: ['18', '20', '22']
include:
- node: '20'
coverage: true
Expand Down
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,37 @@ This is the log of notable changes to EAS CLI and related packages.

### 🛠 Breaking changes

- Treat undefined appVersionSource as REMOTE as a default. ([#2411](https://github.com/expo/eas-cli/pull/2411) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))
- Drop support for Node 16. ([#2413](https://github.com/expo/eas-cli/pull/2413) by [@byCedric](https://github.com/byCedric))
- Update [`eas-build`](https://github.com/expo/eas-build) dependencies to the version requiring Node 18 as minimal Node version. ([#2416](https://github.com/expo/eas-cli/pull/2416) by [@expo-bot](https://github.com/expo-bot))
- Prompt the users to set `appVersionSource`, while mentioning that `remote` is the default. ([#2411](https://github.com/expo/eas-cli/pull/2411) by [@radoslawkrzemien](https://github.com/radoslawkrzemien))

### 🎉 New features

### 🐛 Bug fixes

- Correctly parse the EXPO_APPLE_PROVIER_ID environment variable. ([#2349](https://github.com/expo/eas-cli/pull/2349) by [@louix](https://github.com/louix))

### 🧹 Chores

- Update lockfile to only include `@types/[email protected]`. ([#2412](https://github.com/expo/eas-cli/pull/2412) by [@byCedric](https://github.com/byCedric))
- Update test workflow Node versions to 18, 20, and 22. ([#2413](https://github.com/expo/eas-cli/pull/2413) by [@byCedric](https://github.com/byCedric))

## [9.2.0](https://github.com/expo/eas-cli/releases/tag/v9.2.0) - 2024-06-06

### 🎉 New features

- Add `target-profile` and `source-profile` flags to the `eas build:resign` command. ([#2410](https://github.com/expo/eas-cli/pull/2410) by [@szdziedzic](https://github.com/szdziedzic))
- Display build profile in the output of `eas build:list`. ([#2408](https://github.com/expo/eas-cli/pull/2408) by [@szdziedzic](https://github.com/szdziedzic))

### 🐛 Bug fixes

- Use the correct app config for no GitHub flow in `init:onboarding`. ([#2397](https://github.com/expo/eas-cli/pull/2397) by [@szdziedzic](https://github.com/szdziedzic))
- Disallow picking expired builds as submit archive source. ([#2406](https://github.com/expo/eas-cli/pull/2406) by [@sjchmiela](https://github.com/sjchmiela))

### 🧹 Chores

- Print network error message if present. ([#2407](https://github.com/expo/eas-cli/pull/2407) by [@szdziedzic](https://github.com/szdziedzic))
- Make flags for `eas build:list` command more aligned with flags for rest of the commands. ([#2409](https://github.com/expo/eas-cli/pull/2409) by [@szdziedzic](https://github.com/szdziedzic))

## [9.1.0](https://github.com/expo/eas-cli/releases/tag/v9.1.0) - 2024-05-23

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"npmClient": "yarn",
"version": "9.1.0",
"version": "9.2.0",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
180 changes: 96 additions & 84 deletions packages/eas-cli/README.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions packages/eas-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "eas-cli",
"description": "EAS command line tool",
"version": "9.1.0",
"version": "9.2.0",
"author": "Expo <[email protected]>",
"bin": {
"eas": "./bin/run"
Expand All @@ -13,10 +13,10 @@
"@expo/config": "8.5.4",
"@expo/config-plugins": "7.8.4",
"@expo/config-types": "50.0.0",
"@expo/eas-build-job": "1.0.114",
"@expo/eas-build-job": "1.0.117",
"@expo/eas-json": "9.0.8",
"@expo/json-file": "8.2.37",
"@expo/logger": "1.0.57",
"@expo/logger": "1.0.117",
"@expo/multipart-body-parser": "1.1.0",
"@expo/osascript": "2.0.33",
"@expo/package-manager": "1.1.2",
Expand All @@ -28,7 +28,7 @@
"@expo/results": "1.0.0",
"@expo/rudder-sdk-node": "1.1.1",
"@expo/spawn-async": "1.7.0",
"@expo/steps": "1.0.114",
"@expo/steps": "1.0.117",
"@expo/timeago.js": "1.0.0",
"@oclif/core": "^1.26.2",
"@oclif/plugin-autocomplete": "^2.3.10",
Expand Down Expand Up @@ -121,7 +121,7 @@
"typescript": "5.3.3"
},
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"files": [
"/bin",
Expand Down
2 changes: 1 addition & 1 deletion packages/eas-cli/src/build/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import semver from 'semver';
import { ora } from '../ora';

const PLUGIN_PACKAGE_NAME = 'eas-cli-local-build-plugin';
const PLUGIN_PACKAGE_VERSION = '1.0.112';
const PLUGIN_PACKAGE_VERSION = '1.0.116';

export enum LocalBuildMode {
/**
Expand Down
4 changes: 4 additions & 0 deletions packages/eas-cli/src/build/utils/formatBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export function formatGraphQLBuild(build: BuildFragment): string {
}
},
},
{
label: 'Profile',
value: build.buildProfile,
},
{
label: 'Message',
value: build.message,
Expand Down
71 changes: 42 additions & 29 deletions packages/eas-cli/src/commands/build/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,47 @@ export default class BuildList extends EasCommand {

static override flags = {
platform: Flags.enum({
options: [RequestedPlatform.All, RequestedPlatform.Android, RequestedPlatform.Ios],
options: Object.values(RequestedPlatform),
char: 'p',
}),
status: Flags.enum({
options: [
BuildStatus.NEW,
BuildStatus.IN_QUEUE,
BuildStatus.IN_PROGRESS,
BuildStatus.PENDING_CANCEL,
BuildStatus.ERRORED,
BuildStatus.FINISHED,
BuildStatus.CANCELED,
],
options: Object.values(BuildStatus),
description: 'Filter only builds with the specified status',
}),
distribution: Flags.enum({
options: [
BuildDistributionType.STORE,
BuildDistributionType.INTERNAL,
BuildDistributionType.SIMULATOR,
],
options: Object.values(BuildDistributionType),
description: 'Filter only builds with the specified distribution type',
}),
channel: Flags.string(),
appVersion: Flags.string(),
appBuildVersion: Flags.string(),
sdkVersion: Flags.string(),
runtimeVersion: Flags.string(),
appIdentifier: Flags.string(),
buildProfile: Flags.string(),
gitCommitHash: Flags.string(),
'app-version': Flags.string({
aliases: ['appVersion'],
description: 'Filter only builds created with the specified main app version',
}),
'app-build-version': Flags.string({
aliases: ['appBuildVersion'],
description: 'Filter only builds created with the specified app build version',
}),
'sdk-version': Flags.string({
aliases: ['sdkVersion'],
description: 'Filter only builds created with the specified Expo SDK version',
}),
'runtime-version': Flags.string({
aliases: ['runtimeVersion'],
description: 'Filter only builds created with the specified runtime version',
}),
'app-identifier': Flags.string({
aliases: ['appIdentifier'],
description: 'Filter only builds created with the specified app identifier',
}),
'build-profile': Flags.string({
char: 'e',
aliases: ['profile', 'buildProfile'],
description: 'Filter only builds created with the specified build profile',
}),
'git-commit-hash': Flags.string({
aliases: ['gitCommitHash'],
description: 'Filter only builds created with the specified git commit hash',
}),
...EasPaginatedQueryFlags,
limit: getLimitFlagWithCustomValues({ defaultTo: 10, limit: BUILDS_LIMIT }),
...EasNonInteractiveAndJsonFlags,
Expand Down Expand Up @@ -109,13 +122,13 @@ export default class BuildList extends EasCommand {
status: graphqlBuildStatus,
distribution: graphqlBuildDistribution,
channel: flags.channel,
appVersion: flags.appVersion,
appBuildVersion: flags.appBuildVersion,
sdkVersion: flags.sdkVersion,
runtimeVersion: flags.runtimeVersion,
appIdentifier: flags.appIdentifier,
buildProfile: flags.buildProfile,
gitCommitHash: flags.gitCommitHash,
appVersion: flags['app-version'],
appBuildVersion: flags['app-build-version'],
sdkVersion: flags['sdk-version'],
runtimeVersion: flags['runtime-version'],
appIdentifier: flags['app-identifier'],
buildProfile: flags['build-profile'],
gitCommitHash: flags['git-commit-hash'],
simulator: flags.simulator,
},
paginatedQueryOptions,
Expand Down
34 changes: 27 additions & 7 deletions packages/eas-cli/src/commands/build/resign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ interface BuildResignFlags {
offset?: number;
limit?: number;
platform?: Platform;
profile?: string;
targetProfile?: string;
sourceProfile?: string;
maybeBuildId?: string;
wait: boolean;
}
Expand All @@ -52,7 +53,8 @@ interface RawBuildResignFlags {
offset: number | undefined;
limit: number | undefined;
platform: 'android' | 'ios' | undefined;
profile: string | undefined;
'target-profile': string | undefined;
'source-profile': string | undefined;
wait: boolean;
id: string | undefined;
}
Expand All @@ -65,10 +67,16 @@ export default class BuildResign extends EasCommand {
char: 'p',
options: ['android', 'ios'],
}),
profile: Flags.string({
'target-profile': Flags.string({
char: 'e',
description:
'Name of the build profile from eas.json. Defaults to "production" if defined in eas.json.',
'Name of the target build profile from eas.json. Credentials and environment variables from this profile will be used when re-signing. Defaults to "production" if defined in eas.json.',
helpValue: 'PROFILE_NAME',
aliases: ['profile'],
}),
'source-profile': Flags.string({
description:
'Name of the source build profile from eas.json. Used to filter builds eligible for re-signing.',
helpValue: 'PROFILE_NAME',
}),
wait: Flags.boolean({
Expand Down Expand Up @@ -130,12 +138,20 @@ export default class BuildResign extends EasCommand {
const buildProfile = await EasJsonUtils.getBuildProfileAsync(
easJsonAccessor,
platform,
flags.profile ?? 'production'
flags.targetProfile ?? 'production'
);
const { exp, projectId } = await getDynamicPrivateProjectConfigAsync({ env: buildProfile.env });
const account = await getOwnerAccountForProjectIdAsync(graphqlClient, projectId);
const build = await this.ensureBuildSelectedAsync(
{ graphqlClient, projectId, platform, nonInteractive, limit, offset },
{
graphqlClient,
projectId,
platform,
nonInteractive,
limit,
offset,
buildProfile: flags.sourceProfile,
},
maybeBuild
);
const credentialsCtx = new CredentialsContext({
Expand Down Expand Up @@ -228,7 +244,8 @@ export default class BuildResign extends EasCommand {
offset: flags.offset,
limit: flags.limit,
platform: flags.platform as Platform | undefined,
profile: flags.profile,
sourceProfile: flags['source-profile'],
targetProfile: flags['target-profile'],
maybeBuildId: flags.id,
wait: flags.wait,
};
Expand All @@ -242,13 +259,15 @@ export default class BuildResign extends EasCommand {
nonInteractive,
limit,
offset,
buildProfile,
}: {
graphqlClient: ExpoGraphqlClient;
projectId: string;
platform: Platform;
nonInteractive: boolean;
limit?: number;
offset?: number;
buildProfile?: string;
},
maybeBuild?: BuildFragment
): Promise<BuildFragment> {
Expand All @@ -268,6 +287,7 @@ export default class BuildResign extends EasCommand {
distribution: DistributionType.Internal,
platform: toAppPlatform(platform),
status: BuildStatus.Finished,
buildProfile,
},
});
if (!build) {
Expand Down
4 changes: 2 additions & 2 deletions packages/eas-cli/src/credentials/ios/appstore/authenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@expo/apple-utils';
import assert from 'assert';
import chalk from 'chalk';
import { int } from 'getenv';
import * as getenv from 'getenv';

import {
ApiKeyAuthCtx,
Expand Down Expand Up @@ -191,7 +191,7 @@ async function authenticateAsUserAsync(options: Options = {}): Promise<AuthCtx>
cookies: options.cookies,
teamId: options.teamId ?? process.env.EXPO_APPLE_TEAM_ID,
providerId: process.env.EXPO_APPLE_PROVIDER_ID
? int(process.env.EXPO_APPLE_PROVIDER_ID)
? getenv.int('EXPO_APPLE_PROVIDER_ID')
: undefined,
},
{
Expand Down
4 changes: 2 additions & 2 deletions packages/eas-json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bugs": "https://github.com/expo/eas-cli/issues",
"dependencies": {
"@babel/code-frame": "7.23.5",
"@expo/eas-build-job": "1.0.114",
"@expo/eas-build-job": "1.0.117",
"chalk": "4.1.2",
"env-string": "1.0.1",
"fs-extra": "11.2.0",
Expand All @@ -25,7 +25,7 @@
"typescript": "5.3.3"
},
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"homepage": "https://github.com/expo/eas-cli",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "Expo <[email protected]>",
"license": "MIT",
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"dependencies": {
"chalk": "5.2.0",
Expand Down
Loading

0 comments on commit aeaa8d1

Please sign in to comment.