Merge pull request #101 from Roasbeef/rpc-yaml-fix

build: fix yaml indentation issue
This commit is contained in:
Olaoluwa Osuntokun
2023-06-14 22:46:46 -05:00
committed by GitHub
3 changed files with 20 additions and 9 deletions

View File

@@ -27,15 +27,15 @@ env:
GO_VERSION: 1.19.2 GO_VERSION: 1.19.2
jobs: jobs:
rpc-check: rpc-check:
name: RPC check name: RPC check
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: git checkout - name: git checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Generate RPC stubs and check REST annotations - name: Generate RPC stubs and check REST annotations
run: make rpc-check run: make rpc-check
######################## ########################
# lint code # lint code

View File

@@ -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:

View 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