Derive working directory for API check from location of script. (#1789)

This commit is contained in:
Chris Rankin 2017-10-03 12:51:55 +01:00 committed by GitHub
parent 6c488fd6e0
commit 55af4d211f

View File

@ -2,13 +2,15 @@
echo "Starting API Diff"
apiCurrent=./api-current.txt
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 or ensure working dir is .ci/"
echo "Missing $apiCurrent file - cannot check API diff. Please rebase or add it to this release"
exit -1
fi
diffContents=`diff -u $apiCurrent ../build/api/api-corda-*.txt`
diffContents=`diff -u $apiCurrent $APIHOME/../build/api/api-corda-*.txt`
echo "Diff contents: "
echo "$diffContents"
removals=`echo "$diffContents" | grep "^-\s" | wc -l`