mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-17 09:04:19 +01:00
build: properly add check-rest-annotations.sh
The builds fails otherwise. The Makefile has also been modified to use the proper path here.
This commit is contained in:
2
Makefile
2
Makefile
@@ -121,7 +121,7 @@ rpc-format:
|
|||||||
|
|
||||||
rpc-check: rpc
|
rpc-check: rpc
|
||||||
@$(call print, "Verifying protos.")
|
@$(call print, "Verifying protos.")
|
||||||
cd ./pricesrpc; ../scripts/check-rest-annotations.sh
|
cd ./pricesrpc; ../pricesrpc/check-rest-annotations.sh
|
||||||
if test -n "$$(git status --porcelain)"; then echo "Protos not properly formatted or not compiled with correct version"; git status; git diff; exit 1; fi
|
if test -n "$$(git status --porcelain)"; then echo "Protos not properly formatted or not compiled with correct version"; git status; git diff; exit 1; fi
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
11
pricesrpc/check-rest-annotations.sh
Executable file
11
pricesrpc/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