Skip to content

Commit

Permalink
[eas-cli] add support for with-eas-environment-variables-set flag i…
Browse files Browse the repository at this point in the history
…n `eas update:configure` command (#2668)

<!-- If this PR requires a changelog entry, add it by commenting the PR with the command `/changelog-entry [breaking-change|new-feature|bug-fix|chore] [message]`. -->
<!-- You can skip the changelog check by labeling the PR with "no changelog". -->

# 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.
  • Loading branch information
szdziedzic authored Nov 5, 2024
1 parent 71ca181 commit cf8e715
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions packages/eas-cli/src/commands/update/configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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<RequestedPlatform>({
description: 'Platform to configure',
char: 'p',
options: ['android', 'ios', 'all'],
default: 'all',
options: Object.values(RequestedPlatform),
default: RequestedPlatform.All,
}),
...WithEasEnvironmentVariablesSetFlag,
...EASNonInteractiveFlag,
};

Expand All @@ -32,13 +36,12 @@ export default class UpdateConfigure extends EasCommand {

async runAsync(): Promise<void> {
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(
Expand All @@ -51,7 +54,7 @@ export default class UpdateConfigure extends EasCommand {
exp,
projectId,
projectDir,
platform,
platform: flags['platform'],
vcsClient,
env: undefined,
});
Expand Down

0 comments on commit cf8e715

Please sign in to comment.