From d1c51115675d7c7e3edf1f34ff60084b210043fc Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Thu, 12 Oct 2017 11:39:22 +0100 Subject: [PATCH] =?UTF-8?q?Remove=20the=20two=20header=20lines=20from=20th?= =?UTF-8?q?e=20diff=20output=20to=20simplify=20the=20+/-=20=E2=80=A6=20(#1?= =?UTF-8?q?875)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove the two header lines from the diff output to simplify the +/- check. * Revert Kt class changes as they alter the public API. --- .ci/check-api-changes.sh | 9 +++++---- .../net/corda/core/serialization/SerializationAPI.kt | 2 -- .../main/kotlin/net/corda/core/utilities/KotlinUtils.kt | 2 -- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.ci/check-api-changes.sh b/.ci/check-api-changes.sh index 7694d995dd..e9ac25cf6d 100755 --- a/.ci/check-api-changes.sh +++ b/.ci/check-api-changes.sh @@ -10,13 +10,14 @@ if [ ! -f $apiCurrent ]; then exit -1 fi -diffContents=`diff -u $apiCurrent $APIHOME/../build/api/api-corda-*.txt` -echo "Diff contents:" +# Remove the two header lines from the diff output. +diffContents=`diff -u $apiCurrent $APIHOME/../build/api/api-corda-*.txt | tail --lines=+3` +echo "Diff contents:" echo "$diffContents" echo # A removed line means that an API was either deleted or modified. -removals=$(echo "$diffContents" | grep "^-\s") +removals=$(echo "$diffContents" | grep "^-") removalCount=`grep -v "^$" <