#!/bin/bash set +o posix echo "Starting API Diff" APIHOME=$(dirname $0) apiCurrent=$APIHOME/api-current.txt if [ ! -f $apiCurrent ]; then echo "Missing $apiCurrent file - cannot check API diff. Please rebase or add it to this release" exit -1 fi # Remove the two header lines from the diff output. diffContents=`diff --minimal -u $apiCurrent $APIHOME/../build/api/api-corda-*.txt | tail -n +3` echo "Diff contents:" echo "$diffContents" echo # A removed line means that an API was either deleted or modified. removals=$(echo "$diffContents" | grep "^-") removalCount=`grep -v "^$" <