Skip to content

Commit

Permalink
feat: buildEnforcer() returns created instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Dayan Paez authored and DahShahar committed Nov 3, 2023
1 parent a4e801b commit 57bf448
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/CodePipelineHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,13 @@ export class CodePipelineHelper extends Construct {
if (this.built) {
throw new Error('build() has already been called: can only call it once');
}
this.doBuild();
const enforcer = this.doBuild();
this.built = true;
return enforcer;
}

private doBuild() {
new DeploymentSafetyEnforcer(this, 'Enforcer', {
return new DeploymentSafetyEnforcer(this, 'Enforcer', {
pipeline: this.pipeline.pipeline,
changeCalendars: this.changeCalendarsByStageName,
bakeSteps: this.bakeSteps,
Expand Down

0 comments on commit 57bf448

Please sign in to comment.