mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-17 09:04:19 +01:00
Merge pull request #101 from Roasbeef/rpc-yaml-fix
build: fix yaml indentation issue
This commit is contained in:
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@@ -27,15 +27,15 @@ env:
|
||||
GO_VERSION: 1.19.2
|
||||
|
||||
jobs:
|
||||
rpc-check:
|
||||
name: RPC check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v3
|
||||
rpc-check:
|
||||
name: RPC check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Generate RPC stubs and check REST annotations
|
||||
run: make rpc-check
|
||||
- name: Generate RPC stubs and check REST annotations
|
||||
run: make rpc-check
|
||||
|
||||
########################
|
||||
# lint code
|
||||
|
||||
2
Makefile
2
Makefile
@@ -121,7 +121,7 @@ rpc-format:
|
||||
|
||||
rpc-check: rpc
|
||||
@$(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
|
||||
|
||||
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