Skip to content

Commit 520e40d

Browse files
committed
build: properly add check-rest-annotations.sh
The builds fails otherwise. The Makefile has also been modified to use the proper path here.
1 parent fa51fd5 commit 520e40d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ rpc-format:
121121

122122
rpc-check: rpc
123123
@$(call print, "Verifying protos.")
124-
cd ./pricesrpc; ../scripts/check-rest-annotations.sh
124+
cd ./pricesrpc; ../pricesrpc/check-rest-annotations.sh
125125
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
126126

127127
clean:

pricesrpc/check-rest-annotations.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
for proto in $(find . -name "*.proto"); do
4+
for rpc in $(awk '/ rpc /{print $2}' "$proto"); do
5+
yaml=${proto%%.proto}.yaml
6+
if ! grep -q "$rpc" "$yaml"; then
7+
echo "RPC $rpc not added to $yaml file"
8+
exit 1
9+
fi
10+
done
11+
done

0 commit comments

Comments
 (0)