From cf8e715cd54e6ea8e71c535ae5845959e62bb123 Mon Sep 17 00:00:00 2001 From: Szymon Dziedzic Date: Tue, 5 Nov 2024 12:44:27 +0100 Subject: [PATCH] [eas-cli] add support for `with-eas-environment-variables-set` flag in `eas update:configure` command (#2668) # Why Add support for `with-eas-environment-variables-set` flag in `eas update:configure` command # How Use the flag the same way we do for `eas update`. # Test Plan Run command. --- .../eas-cli/src/commands/update/configure.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/eas-cli/src/commands/update/configure.ts b/packages/eas-cli/src/commands/update/configure.ts index e665776fc5..c8d09f3d6d 100644 --- a/packages/eas-cli/src/commands/update/configure.ts +++ b/packages/eas-cli/src/commands/update/configure.ts @@ -3,7 +3,10 @@ import chalk from 'chalk'; import { easJsonExistsAsync } from '../../build/configure'; import EasCommand from '../../commandUtils/EasCommand'; -import { EASNonInteractiveFlag } from '../../commandUtils/flags'; +import { + EASNonInteractiveFlag, + WithEasEnvironmentVariablesSetFlag, +} from '../../commandUtils/flags'; import Log, { learnMore } from '../../log'; import { RequestedPlatform } from '../../platform'; import { @@ -15,12 +18,13 @@ export default class UpdateConfigure extends EasCommand { static override description = 'configure the project to support EAS Update'; static override flags = { - platform: Flags.enum({ + platform: Flags.enum({ description: 'Platform to configure', char: 'p', - options: ['android', 'ios', 'all'], - default: 'all', + options: Object.values(RequestedPlatform), + default: RequestedPlatform.All, }), + ...WithEasEnvironmentVariablesSetFlag, ...EASNonInteractiveFlag, }; @@ -32,13 +36,12 @@ export default class UpdateConfigure extends EasCommand { async runAsync(): Promise { const { flags } = await this.parse(UpdateConfigure); - const platform = flags.platform as RequestedPlatform; const { privateProjectConfig: { projectId, exp, projectDir }, vcsClient, } = await this.getContextAsync(UpdateConfigure, { nonInteractive: flags['non-interactive'], - withServerSideEnvironment: null, + withServerSideEnvironment: flags['with-eas-environment-variables-set'], }); Log.log( @@ -51,7 +54,7 @@ export default class UpdateConfigure extends EasCommand { exp, projectId, projectDir, - platform, + platform: flags['platform'], vcsClient, env: undefined, });