diff --git a/CHANGELOG.md b/CHANGELOG.md index d3cf0ead68..86cf57ad36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ This is the log of notable changes to EAS CLI and related packages. ### 🧹 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 diff --git a/packages/eas-cli/src/commands/build/list.ts b/packages/eas-cli/src/commands/build/list.ts index 5a001a0be4..bb13112650 100644 --- a/packages/eas-cli/src/commands/build/list.ts +++ b/packages/eas-cli/src/commands/build/list.ts @@ -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, @@ -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,