Skip to content

Commit

Permalink
Derive working directory for API check from location of script. (cord…
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisr3 authored Oct 3, 2017
1 parent 6c488fd commit 55af4d2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .ci/check-api-changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 55af4d2

Please sign in to comment.