From 0313a2acadcdea6ad3f3257d342fbc61abc1d117 Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Mon, 1 Jul 2019 15:34:46 -0700 Subject: [PATCH] feat: add possibility of adding exemptions to the compatibility check. --- .../allowed-breaking-changes-0.36.1.txt | 1 + .../allowed-breaking-changes-0.36.1.txt | 18 ++++++++++++++++++ .../allowed-breaking-changes-0.36.1.txt | 2 ++ scripts/check-api-compatibility.sh | 6 +++++- 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 packages/@aws-cdk/app-delivery/allowed-breaking-changes-0.36.1.txt create mode 100644 packages/@aws-cdk/aws-codepipeline-actions/allowed-breaking-changes-0.36.1.txt create mode 100644 packages/@aws-cdk/aws-codepipeline/allowed-breaking-changes-0.36.1.txt diff --git a/packages/@aws-cdk/app-delivery/allowed-breaking-changes-0.36.1.txt b/packages/@aws-cdk/app-delivery/allowed-breaking-changes-0.36.1.txt new file mode 100644 index 0000000000000..390b5a9625102 --- /dev/null +++ b/packages/@aws-cdk/app-delivery/allowed-breaking-changes-0.36.1.txt @@ -0,0 +1 @@ +incompatible-argument:@aws-cdk/app-delivery.PipelineDeployStackAction.bind diff --git a/packages/@aws-cdk/aws-codepipeline-actions/allowed-breaking-changes-0.36.1.txt b/packages/@aws-cdk/aws-codepipeline-actions/allowed-breaking-changes-0.36.1.txt new file mode 100644 index 0000000000000..4c081c600b843 --- /dev/null +++ b/packages/@aws-cdk/aws-codepipeline-actions/allowed-breaking-changes-0.36.1.txt @@ -0,0 +1,18 @@ +incompatible-argument:@aws-cdk/aws-codepipeline-actions.Action.bind +incompatible-argument:@aws-cdk/aws-codepipeline-actions.Action.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.AlexaSkillDeployAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.CodeDeployServerDeployAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.CloudFormationCreateReplaceChangeSetAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.CloudFormationCreateUpdateStackAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.CloudFormationDeleteStackAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.CloudFormationExecuteChangeSetAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.CodeBuildAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.CodeCommitSourceAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.EcrSourceAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.EcsDeployAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.GitHubSourceAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.JenkinsAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.LambdaInvokeAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.ManualApprovalAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.S3DeployAction.bound +incompatible-argument:@aws-cdk/aws-codepipeline-actions.S3SourceAction.bound diff --git a/packages/@aws-cdk/aws-codepipeline/allowed-breaking-changes-0.36.1.txt b/packages/@aws-cdk/aws-codepipeline/allowed-breaking-changes-0.36.1.txt new file mode 100644 index 0000000000000..b344d13444ebc --- /dev/null +++ b/packages/@aws-cdk/aws-codepipeline/allowed-breaking-changes-0.36.1.txt @@ -0,0 +1,2 @@ +incompatible-argument:@aws-cdk/aws-codepipeline.IAction.bind +removed:@aws-cdk/aws-codepipeline.IPipeline.artifactBucket diff --git a/scripts/check-api-compatibility.sh b/scripts/check-api-compatibility.sh index ad63043b13427..609eac839fb81 100755 --- a/scripts/check-api-compatibility.sh +++ b/scripts/check-api-compatibility.sh @@ -44,12 +44,16 @@ fi #---------------------------------------------------------------------- +# get the current version from Lerna +current_version=$(npx lerna ls -pl | head -n 1 | cut -d ':' -f 3) + echo "Checking compatibility..." >&2 success=true for i in ${!package_dirs[*]}; do if [[ ! -d $tmpdir/node_modules/${package_names[$i]} ]]; then continue; fi echo -n "${package_names[$i]}... " - if npx jsii-diff --experimental-errors $tmpdir/node_modules/${package_names[$i]} ${package_dirs[$i]} 2>$tmpdir/output.txt; then + if npx jsii-diff --experimental-errors $tmpdir/node_modules/${package_names[$i]} ${package_dirs[$i]} \ + --ignore-file ${package_dirs[$i]}/allowed-breaking-changes-${current_version}.txt 2>$tmpdir/output.txt; then echo "OK." else success=false