Skip to content

Commit

Permalink
feat(toolkit): include toolkit version in AWS::CDK::Metadata
Browse files Browse the repository at this point in the history
Adds the AWS CDK Toolkit version to the modules list
of the AWS::CDK::Metadata resource to improve diagnosability
and analytics.

Fixes #1286
  • Loading branch information
Elad Ben-Israel committed Dec 5, 2018
1 parent 2625a05 commit d64fb43
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/aws-cdk/lib/api/cxapp/stacks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ export class AppStacks {

function formatModules(runtime: cxapi.AppRuntime): string {
const modules = new Array<string>();

const toolkitVersion = require('../../../package.json').version;

modules.push(`aws-cdk=${toolkitVersion}`);

for (const key of Object.keys(runtime.libraries).sort()) {
modules.push(`${key}=${runtime.libraries[key]}`);
}
Expand Down

0 comments on commit d64fb43

Please sign in to comment.