]> git.bitcoin.ninja Git - ldk-java/commitdiff
[TS] Set LDK_GARBAGECOLLECTED_GIT_OVERRIDE so that versions work
authorMatt Corallo <git@bluematt.me>
Mon, 17 Jan 2022 04:29:02 +0000 (04:29 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 17 Jan 2022 04:34:51 +0000 (04:34 +0000)
genbindings.sh

index 5576b8dba3f17c93d7bf958aa02417de3dcbd60e..ce9411e1c012cc43020c1d6c70b6c60661eed6ea 100755 (executable)
@@ -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>.*<\/version>/    <version>${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}<\/version>/g" pom.xml