Skip to content

Commit

Permalink
Fix pkglint rule to look at the root package.json to decide what shou…
Browse files Browse the repository at this point in the history
…ld be the repo-wide version
  • Loading branch information
Elad Ben-Israel committed Feb 26, 2020
1 parent b356b47 commit 1c6a08a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/pkglint/lib/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,12 @@ export class MustDependonCdkByPointVersions extends ValidationRule {
public readonly name = 'dependencies/cdk-point-dependencies';

public validate(pkg: PackageJson): void {
// yes, ugly, but we have a bunch of references to other files in the repo
// here anyway, and it's not different than reading the root lerna.json
const expectedVersion = require('../../../scripts/get-version-marker');
// yes, ugly, but we have a bunch of references to other files in the repo.
// we use the root package.json to determine what should be the version
// across the repo: in local builds, this should be 0.0.0 and in CI builds
// this would be the actual version of the repo after it's been aligned
// using scripts/align-version.sh
const expectedVersion = require('../../../package.json').version;
const ignore = [
'@aws-cdk/cloudformation-diff',
'@aws-cdk/cfnspec',
Expand Down

0 comments on commit 1c6a08a

Please sign in to comment.