Skip to content

Commit 481a8f5

Browse files
authored
Merge pull request #101 from Roasbeef/rpc-yaml-fix
build: fix yaml indentation issue
2 parents 68b8d1b + 520e40d commit 481a8f5

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ env:
2727
GO_VERSION: 1.19.2
2828

2929
jobs:
30-
rpc-check:
31-
name: RPC check
32-
runs-on: ubuntu-latest
33-
steps:
34-
- name: git checkout
35-
uses: actions/checkout@v3
30+
rpc-check:
31+
name: RPC check
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: git checkout
35+
uses: actions/checkout@v3
3636

37-
- name: Generate RPC stubs and check REST annotations
38-
run: make rpc-check
37+
- name: Generate RPC stubs and check REST annotations
38+
run: make rpc-check
3939

4040
########################
4141
# lint code

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)