From 3c3bce341589e38864b1e3863baf907686097706 Mon Sep 17 00:00:00 2001 From: positiveblue Date: Wed, 26 Jan 2022 22:52:03 -0800 Subject: [PATCH] makefile: fail rpc-check after finding any changes `rpc-check` is used in our CI pipeline to detect any difference between the committed and the automatically generated rpc files. Unfortunately, the current method only detects changes in the already existing files and won't fail if `make rpc` generates a totally new file. `git status --porcelain` makes the trick, it returns a line for each file that has been modified, created or deleted. --- Makefile | 2 +- docs/release-notes/release-notes-0.15.0.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7b7999bde..a28199bc6 100644 --- a/Makefile +++ b/Makefile @@ -280,7 +280,7 @@ rpc-format: rpc-check: rpc @$(call print, "Verifying protos.") cd ./lnrpc; ../scripts/check-rest-annotations.sh - if test -n "$$(git describe --dirty | grep dirty)"; then echo "Protos not properly formatted or not compiled with v3.4.0"; git status; git diff; exit 1; fi + if test -n "$$(git status --porcelain)"; then echo "Protos not properly formatted or not compiled with v3.4.0"; git status; git diff; exit 1; fi rpc-js-compile: @$(call print, "Compiling JSON/WASM stubs.") diff --git a/docs/release-notes/release-notes-0.15.0.md b/docs/release-notes/release-notes-0.15.0.md index 9f6000be2..aa682e699 100644 --- a/docs/release-notes/release-notes-0.15.0.md +++ b/docs/release-notes/release-notes-0.15.0.md @@ -83,6 +83,9 @@ allows code external to lnd to call the function, where previously it would require access to lnd's internals. +* [rpc-check fails if it finds any changes](https://github.com/lightningnetwork/lnd/pull/6207/) + including new and deleted files. + # Contributors (Alphabetical Order) * 3nprob @@ -96,6 +99,7 @@ * ErikEk * henta * Joost Jager +* Jordi Montes * LightningHelper * Liviu * mateuszmp