Skip to content

Commit

Permalink
fix(codebuild): Rename includeBuildID property of S3BucketBuildArtifacts
Browse files Browse the repository at this point in the history
The property name ending with `ID` caused a mismatch of names to appear
in non-TypeScript languages, as the name translation rules would convert
back to `Id`.

BREAKING CHANGE: the `includeBuildID` property of
`S3BucketBuildArtifacts` was renamed to `includeBuildId` (note the
lower-case trailing `d`).

Fixes #1347
  • Loading branch information
RomainMuller committed Dec 13, 2018
1 parent 2dfd593 commit 890bbd5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/@aws-cdk/aws-codebuild/lib/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export abstract class BuildArtifacts {

public toArtifactsJSON(): cloudformation.ProjectResource.ArtifactsProperty {
const artifactsProp = this.toArtifactsProperty();
// tslint:disable-next-line
console.error('artifactsProp.namespaceType:', artifactsProp.namespaceType);
return {
artifactIdentifier: this.identifier,
type: this.type,
Expand Down Expand Up @@ -102,7 +104,7 @@ export interface S3BucketBuildArtifactsProps extends BuildArtifactsProps {
*
* @default true
*/
includeBuildID?: boolean;
includeBuildId?: boolean;

/**
* If this is true, all build output will be packaged into a single .zip file.
Expand All @@ -128,10 +130,12 @@ export class S3BucketBuildArtifacts extends BuildArtifacts {
}

protected toArtifactsProperty(): any {
// tslint:disable-next-line
console.error("this.props.includeBuildID:", this.props.includeBuildId);
return {
location: this.props.bucket.bucketName,
path: this.props.path,
namespaceType: this.props.includeBuildID === false ? 'NONE' : 'BUILD_ID',
namespaceType: this.props.includeBuildId === false ? 'NONE' : 'BUILD_ID',
name: this.props.name,
packaging: this.props.packageZip === false ? 'NONE' : 'ZIP',
};
Expand Down

0 comments on commit 890bbd5

Please sign in to comment.