From 55af4d211faf7d42c05cd4b64ae6d2e8ba2a387f Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Tue, 3 Oct 2017 12:51:55 +0100 Subject: [PATCH] Derive working directory for API check from location of script. (#1789) --- .ci/check-api-changes.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.ci/check-api-changes.sh b/.ci/check-api-changes.sh index dd7d8efd60..e2bd6afddc 100755 --- a/.ci/check-api-changes.sh +++ b/.ci/check-api-changes.sh @@ -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`