Remove the two header lines from the diff output to simplify the +/- … (#1875)

* Remove the two header lines from the diff output to simplify the +/- check.
* Revert Kt class changes as they alter the public API.
This commit is contained in:
Chris Rankin 2017-10-12 11:39:22 +01:00 committed by GitHub
parent 327f0ebd73
commit d1c5111567
3 changed files with 5 additions and 8 deletions

View File

@ -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 "^$" <<EOF | wc -l
$removals
EOF
@ -29,7 +30,7 @@ if [ $removalCount -gt 0 ]; then
fi
# Adding new abstract methods could also break the API.
newAbstracts=$(echo "$diffContents" | grep "^+\s" | grep "\(public\|protected\) abstract")
newAbstracts=$(echo "$diffContents" | grep "^+" | grep "\(public\|protected\) abstract")
abstractCount=`grep -v "^$" <<EOF | wc -l
$newAbstracts
EOF

View File

@ -1,5 +1,3 @@
@file:JvmName("SerializationAPI")
package net.corda.core.serialization
import net.corda.core.crypto.SecureHash

View File

@ -1,5 +1,3 @@
@file:JvmName("KotlinUtils")
package net.corda.core.utilities
import net.corda.core.internal.concurrent.get