Skip to content

Commit 4818d25

Browse files
committed
doc: allow commits to suppress the schema checks.
The stupid requirement for JSON commas combines with our inability to annotate the removal or introduction of enum values and our naive check here, to produce a false positive. Allow commit messages to suppress. No-schema-diff-check: removed enum `websocket` as value type. Signed-off-by: Rusty Russell <[email protected]>
1 parent 8e60c66 commit 4818d25

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,14 @@ doc/index.rst: $(MANPAGES:=.md)
231231
# When running on GitHub (CI=true), we need to fetch origin/master
232232
schema-added-check:
233233
@if ! test -z $$CI; then git fetch origin master; fi; \
234+
if git show --format=%B -s origin/master.. | grep -q '^No-schema-diff-check'; then exit 0; fi; \
234235
if git diff origin/master -- doc/schemas | grep -q '^+.*{' && ! git diff origin/master -- doc/schemas | grep -q '^+.*"added"'; then \
235236
git diff origin/master -- doc/schemas; \
236237
echo 'New schema fields must have "added": "vNEXTVERSION"' >&2; exit 1; \
237238
fi
238239
schema-removed-check:
239240
@if ! test -z $$CI; then git fetch origin master; fi; \
241+
if git show --format=%B -s origin/master.. | grep -q '^No-schema-diff-check'; then exit 0; fi; \
240242
if git diff origin/master -- doc/schemas | grep -q '^-.*{' && ! git diff origin/master -- doc/schemas | grep -q '^-.*"deprecated"' && ! git diff origin/master -- doc/schemas | grep -q '^-.*EXPERIMENTAL_FEATURES'; then \
241243
git diff origin/master -- doc/schemas ; \
242244
echo 'Schema fields must be "deprecated", with version, not removed' >&2; exit 1; \

0 commit comments

Comments
 (0)