Skip to content

Commit

Permalink
fix: does not create build for ll (aws-amplify#8706)
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarkarachi authored and Sachin Panemangalore committed Nov 10, 2021
1 parent 6becb01 commit 28f4b55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/amplify-cli-core/src/cliConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export enum CLISubCommandType {
CONSOLE = 'console',
IMPORT = 'import',
OVERRIDE = 'override',
MIGRATE = 'migrate'
MIGRATE = 'migrate',
}
export const AmplifyCategories = {
STORAGE: 'storage',
Expand All @@ -29,17 +29,18 @@ export const AmplifyCategories = {
NOTIFICATIONS: 'notifications',
PREDICTIONS: 'predictions',
ANALYTICS: 'analytics',
CUSTOM: 'custom',
};

export const AmplifySupportedService = {
S3: 'S3',
DYNAMODB: 'DynamoDB',
COGNITO: 'Cognito',
COGNITOUSERPOOLGROUPS: 'Cognito-UserPool-Groups',
LAMBDA : 'Lambda'
LAMBDA: 'Lambda',
};

export const overriddenCategories = [AmplifyCategories.AUTH, AmplifyCategories.STORAGE];
export const overriddenCategories = [AmplifyCategories.AUTH, AmplifyCategories.STORAGE, AmplifyCategories.CUSTOM];

export type IAmplifyResource = {
category: string;
Expand Down
3 changes: 2 additions & 1 deletion packages/amplify-cli-core/src/state-manager/pathManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as path from 'path';
import * as fs from 'fs-extra';
import { homedir } from 'os';
import { NotInitializedError } from '../errors';
import { overriddenCategories } from '..';

export const PathConstants = {
// in home directory
Expand Down Expand Up @@ -146,7 +147,7 @@ export class PathManager {
getResourceParametersFilePath = (projectPath: string | undefined, category: string, resourceName: string): string => {
let isBuildParametersjson: boolean = false;
const resourceDirPath = this.getResourceDirectoryPath(projectPath, category, resourceName);
if (!fs.existsSync(path.join(resourceDirPath, PathConstants.ParametersJsonFileName))) {
if (!fs.existsSync(path.join(resourceDirPath, PathConstants.ParametersJsonFileName)) && overriddenCategories.includes(category)) {
isBuildParametersjson = true;
}
const basePath = isBuildParametersjson ? path.join(resourceDirPath, PathConstants.BuildDirName) : resourceDirPath;
Expand Down

0 comments on commit 28f4b55

Please sign in to comment.