X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=genbindings.sh;h=ce9411e1c012cc43020c1d6c70b6c60661eed6ea;hb=015a16c91a171f742f91a83d694445111b1c99a4;hp=25c8ffbe91c0b4774a4fb4051158ce33e703ecaa;hpb=a18326f4021652cd31d5b092b1f6cf02d49f5116;p=ldk-java diff --git a/genbindings.sh b/genbindings.sh index 25c8ffbe..ce9411e1 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -35,6 +35,14 @@ else sed -i "s/TransactionOutputs/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ/g" ./lightning.h fi +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 + if [ "$2" != "wasm" ]; then TARGET_STRING="$LDK_TARGET" if [ "$TARGET_STRING" = "" ]; then @@ -61,14 +69,6 @@ if [ "$2" != "wasm" ]; then LDK_TARGET_CPU="sandybridge" fi - 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 - 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/^ .*<\/version>/ ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}<\/version>/g" pom.xml @@ -223,13 +223,12 @@ else tsc else tsc --types node --typeRoots . - cd .. if [ -x "$(which node)" ]; then NODE_V="$(node --version)" if [ "${NODE_V:1:2}" -gt 14 ]; then rm -f liblightningjs.wasm - ln -s $WASM_FILE liblightningjs.wasm - node ts/test/node.mjs + ln -s "$(pwd)"/../$WASM_FILE liblightningjs.wasm + node test/node.mjs fi fi fi