Skip to content

Commit

Permalink
[eas-cli] Deprecate --skip-credentials-check
Browse files Browse the repository at this point in the history
  • Loading branch information
brentvatne committed Jun 11, 2021
1 parent 2f7ac71 commit d96c1f4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🧹 Chores

- Deprecate `--skip-credentials-check` flag because it doesn't do anything and is no longer needed.([#442](https://github.com/expo/eas-cli/pull/442) by [@brentvatne](https://github.com/brentvatne))

## [0.17.0](https://github.com/expo/eas-cli/releases/tag/v0.17.0) - 2021-06-02

### 🐛 Bug fixes
Expand Down
1 change: 0 additions & 1 deletion packages/eas-cli/src/build/android/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ async function ensureAndroidCredentialsAsync(
projectName: ctx.commandCtx.projectName,
androidApplicationIdentifier,
},
skipCredentialsCheck: ctx.commandCtx.skipCredentialsCheck,
}
);
const { credentialsSource } = ctx.buildProfile;
Expand Down
4 changes: 0 additions & 4 deletions packages/eas-cli/src/build/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export interface CommandContext {
nonInteractive: boolean;
local: boolean;
clearCache: boolean;
skipCredentialsCheck: boolean;
skipProjectConfiguration: boolean;
waitForBuildEnd: boolean;
}
Expand All @@ -35,7 +34,6 @@ export async function createCommandContextAsync({
nonInteractive = false,
local,
clearCache = false,
skipCredentialsCheck = false,
skipProjectConfiguration = false,
waitForBuildEnd,
}: {
Expand All @@ -47,7 +45,6 @@ export async function createCommandContextAsync({
nonInteractive: boolean;
local: boolean;
clearCache: boolean;
skipCredentialsCheck: boolean;
skipProjectConfiguration: boolean;
waitForBuildEnd: boolean;
}): Promise<CommandContext> {
Expand All @@ -67,7 +64,6 @@ export async function createCommandContextAsync({
nonInteractive,
local,
clearCache,
skipCredentialsCheck,
skipProjectConfiguration,
waitForBuildEnd,
};
Expand Down
11 changes: 9 additions & 2 deletions packages/eas-cli/src/commands/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class Build extends EasCommand {
platform: flags.enum({ char: 'p', options: ['android', 'ios', 'all'] }),
'skip-credentials-check': flags.boolean({
default: false,
description: 'Skip validation of build credentials',
hidden: true,
}),
'skip-project-configuration': flags.boolean({
default: false,
Expand Down Expand Up @@ -64,6 +64,14 @@ export default class Build extends EasCommand {
const platform =
(flags.platform as RequestedPlatform | undefined) ?? (await promptForPlatformAsync());

if (flags['skip-credentials-check']) {
Log.warnDeprecatedFlag(
'skip-credentials-check',
'Build credential validation is always skipped with the --non-interactive flag. You can also skip interactively.'
);
Log.newLine();
}

const projectDir = (await findProjectRootAsync()) ?? process.cwd();
let { exp } = getConfig(projectDir, { skipSDKVersionRequirement: true });
const projectId = await getProjectIdAsync(exp);
Expand All @@ -89,7 +97,6 @@ export default class Build extends EasCommand {
projectId,
nonInteractive,
clearCache: flags['clear-cache'],
skipCredentialsCheck: flags['skip-credentials-check'],
local: flags.local,
skipProjectConfiguration: flags['skip-project-configuration'],
waitForBuildEnd: flags.wait,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export interface AndroidCredentials {

interface Options {
app: AppLookupParams;
skipCredentialsCheck?: boolean;
}

export default class AndroidCredentialsProvider {
Expand Down
4 changes: 4 additions & 0 deletions packages/eas-cli/src/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export default class Log {
Log.consoleLog(...Log.withTextColor(args, chalk.gray));
}

public static warnDeprecatedFlag(flag: string, message: string) {
Log.warn(`› ${chalk.bold('--' + flag)} flag is deprecated. ${message}`);
}

public static succeed(message: string) {
ora().succeed(message);
}
Expand Down

0 comments on commit d96c1f4

Please sign in to comment.