]> git.bitcoin.ninja Git - ldk-c-bindings/commitdiff
Use 16 hexits for git describe to avoid nondeterminism
authorMatt Corallo <git@bluematt.me>
Wed, 9 Jun 2021 19:13:59 +0000 (19:13 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 9 Jun 2021 19:15:39 +0000 (19:15 +0000)
genbindings.sh

index a51f04a81fde7c72f40a6798a3ba9544205beeef..b5cbca366dace820b8dffcdfcdf8fcd748938d42 100755 (executable)
@@ -15,7 +15,7 @@ export LC_ALL=C
 ORIG_PWD="$(pwd)"
 cd "$1"
 LIGHTNING_PATH="$(pwd)"
-LIGHTNING_GIT="$(git describe --tag --dirty)"
+LIGHTNING_GIT="$(git describe --tag --dirty --abbrev=16)"
 cd "$ORIG_PWD"
 
 # Generate (and reasonably test) C bindings
@@ -33,7 +33,7 @@ mv lightning-c-bindings/src/bitcoin ./
 
 git checkout lightning-c-bindings/src
 git checkout lightning-c-bindings/include
-BINDINGS_GIT="$(git describe --tag --dirty)"
+BINDINGS_GIT="$(git describe --tag --dirty --abbrev=16)"
 echo -e "#ifndef _LDK_HEADER_VER" > lightning-c-bindings/include/ldk_ver.h
 echo -e "static inline int _ldk_strncmp(const char *s1, const char *s2, uint64_t n) {" >> lightning-c-bindings/include/ldk_ver.h
 echo -e "\tif (n && *s1 != *s2) return 1;" >> lightning-c-bindings/include/ldk_ver.h