[TS] Auto-update version in package.json in genbindings.sh
authorMatt Corallo <git@bluematt.me>
Thu, 30 Jun 2022 19:55:19 +0000 (19:55 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 30 Jun 2022 20:44:20 +0000 (20:44 +0000)
.github/workflows/build.yml
genbindings.sh
ts/package.json

index 12a9990748d90fdb2882086c08ee46e6cc14d8bc..0b5ce9d236eaceb71d9fe85a313abb964a115478 100644 (file)
@@ -95,6 +95,7 @@ jobs:
           kill $SERVER_PID
       - name: Check latest TS files are in git
         run: |
+          git checkout ts/package.json
           git diff --exit-code
 
   java_bindings:
index a78e57ed4a2ab79e05b486c7debbbf17610074e3..4102884dc92350ac4cb91565abfefa8d87979b2e 100755 (executable)
@@ -189,6 +189,7 @@ else
                ./genbindings.py "./lightning.h" ts ts ts $DEBUG_ARG typescript browser
        fi
        rm -f ts/bindings.c
+       sed -i 's/^  "version": .*/  "version": "'${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}'",/g' ts/package.json
        if [ "$3" = "true" ]; then
                echo "#define LDK_DEBUG_BUILD" > ts/bindings.c
        elif [ "$3" = "leaks" ]; then
index 9d019577bfd6f73e5671cad19d16e7dc47c8f703..907a0d4e405a126469ec431f67f9c6d9146b0a56 100644 (file)
@@ -1,6 +1,6 @@
 {
   "name": "lightningdevkit",
-  "version": "0.0.106.0beta1",
+  "version": "Set in genbindings.sh automagically",
   "description": "Lightning Development Kit",
   "main": "index.mjs",
   "types": "index.d.mts",