mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 08:34:20 +01:00
CI: rough check that schema changes seem to mention added, don't delete non-deprcated.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
11
doc/Makefile
11
doc/Makefile
@@ -203,3 +203,14 @@ doc/index.rst: $(MANPAGES:=.md)
|
|||||||
sed 's/\(.*\)\.\(.*\).*\.md/\1 <\1.\2.md>/' | \
|
sed 's/\(.*\)\.\(.*\).*\.md/\1 <\1.\2.md>/' | \
|
||||||
python3 devtools/blockreplace.py doc/index.rst manpages --language=rst --indent " " \
|
python3 devtools/blockreplace.py doc/index.rst manpages --language=rst --indent " " \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# For CI to (very roughly!) check that we only deprecated fields, or labelled added ones
|
||||||
|
schema-added-check:
|
||||||
|
@if git diff master doc/schemas | grep -q '^+.*{' && ! git diff master doc/schemas | grep -q '^+.*"added"'; then echo 'New schema fields must have "added": "vNEXTVERSION"' >&2; exit 1; fi
|
||||||
|
|
||||||
|
schema-removed-check:
|
||||||
|
@if git diff master doc/schemas | grep -q '^-.*{' && ! git diff master doc/schemas | grep -q '^-.*"deprecated": "'; then echo 'Schema fields must be deprecated, with version, not removed' >&2; exit 1; fi
|
||||||
|
|
||||||
|
schema-diff-check: schema-added-check schema-removed-check
|
||||||
|
|
||||||
|
check-source: schema-diff-check
|
||||||
|
|||||||
Reference in New Issue
Block a user