Skip to content

Commit

Permalink
chore(cdk-build-tools): backport feature flag based conditional from …
Browse files Browse the repository at this point in the history
…v2-main (#13056)

This was originally commented out - d7e028a - since this was not yet
compatible with the v2-main branch.

Since then, the v2-main branch has been updated - 7554246 - with the
necessary fixes and the conditional has been enabled there[1].

No effective change to master branch because of this. It reduces divergence
of the two active branches.

[1]: 7554246#diff-d325e066c7cdf5d2a8423e65b0190045defe711b4dc25adc0a94a11eef163ed9


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Niranjan Jayakar authored and Elad Ben-Israel committed Feb 22, 2021
1 parent 8913b83 commit c2bb428
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tools/cdk-build-tools/lib/feature-flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ export function testFutureBehavior<T>(

const major = cdkMajorVersion(repoRoot);
if (major === 2) {
// Temporaily disable CDKv2 behaviour
// const app = new cdkApp();
// return test(name, async () => fn(app));
const app = new cdkApp();
return test(name, async () => fn(app));
}
const app = new cdkApp({ context: flags });
return test(name, () => fn(app));
Expand All @@ -59,8 +58,7 @@ export function testLegacyBehavior<T>(

const major = cdkMajorVersion(repoRoot);
if (major === 2) {
// Temporarily disable CDKv2 behaviour
// return;
return;
}
const app = new cdkApp();
return test(name, () => fn(app));
Expand All @@ -78,4 +76,4 @@ function cdkMajorVersion(repoRoot: string) {
throw new Error(`version ${ver} is not a semver`);
}
return sem.major;
}
}

0 comments on commit c2bb428

Please sign in to comment.