X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=genbindings.sh;h=7e5588fa21058f891cc245b46863000e4b272e2f;hb=cc8b92921f3e342cdfb0ceb070cee2b742371aea;hp=c7a06d5e18a53554e3b2e166525ed05ef7d2ea44;hpb=da49351ec14e95c8e9a27eacf8c7a9924a0b488e;p=ldk-java diff --git a/genbindings.sh b/genbindings.sh index c7a06d5e..7e5588fa 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -49,13 +49,19 @@ set -e if [ "$LDK_GARBAGECOLLECTED_GIT_OVERRIDE" = "" ]; then export LDK_GARBAGECOLLECTED_GIT_OVERRIDE=$(git describe --tag --dirty) fi +if [ "${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:0:1}" != "v" ]; then + echo "Version tag should start with a v" > /dev/stderr + exit 1 +fi cp "$1/lightning-c-bindings/include/lightning.h" ./ if [ "$(rustc --version --verbose | grep "host:")" = "host: x86_64-apple-darwin" ]; then # OSX sed is for some reason not compatible with GNU sed sed -i '' "s/TransactionOutputs/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ/g" ./lightning.h + sed -i '' "s/^ .*<\/version>/ ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}<\/version>/g" pom.xml else sed -i "s/TransactionOutputs/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ/g" ./lightning.h + sed -i "s/^ .*<\/version>/ ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}<\/version>/g" pom.xml fi echo "Creating Java bindings..."