mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-31 17:51:33 +02:00
make+scripts: fix rpc-check command
This commit is contained in:
2
Makefile
2
Makefile
@@ -289,7 +289,7 @@ rpc-format:
|
|||||||
|
|
||||||
rpc-check: rpc
|
rpc-check: rpc
|
||||||
@$(call print, "Verifying protos.")
|
@$(call print, "Verifying protos.")
|
||||||
for rpc in $$(find lnrpc/ -name "*.proto" | $(XARGS) awk '/ rpc /{print $$2}'); do if ! grep -q $$rpc lnrpc/rest-annotations.yaml; then echo "RPC $$rpc not added to lnrpc/rest-annotations.yaml"; exit 1; fi; done
|
cd ./lnrpc; ../scripts/check-rest-annotations.sh
|
||||||
if test -n "$$(git describe --dirty | grep dirty)"; then echo "Protos not properly formatted or not compiled with v3.4.0"; git status; git diff; exit 1; fi
|
if test -n "$$(git describe --dirty | grep dirty)"; then echo "Protos not properly formatted or not compiled with v3.4.0"; git status; git diff; exit 1; fi
|
||||||
|
|
||||||
sample-conf-check:
|
sample-conf-check:
|
||||||
|
11
scripts/check-rest-annotations.sh
Executable file
11
scripts/check-rest-annotations.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
for proto in $(find . -name "*.proto"); do
|
||||||
|
for rpc in $(awk '/ rpc /{print $2}' "$proto"); do
|
||||||
|
yaml=${proto%%.proto}.yaml
|
||||||
|
if ! grep -q "$rpc" "$yaml"; then
|
||||||
|
echo "RPC $rpc not added to $yaml file"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
Reference in New Issue
Block a user