mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-23 07:35:13 +03:00
examples: Do CI pre-commit checks on man page examples
This commit is contained in:
1 parent
7dab8f6fb2
commit
79e6fcdb26
2 files changed
+25
-7
No files matched your search
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -f man/tmp/*.c
|
||||
man/examples-code-check man
|
||||
EXIT1=$?
|
||||
git add -f man/tmp/*.c
|
||||
pre-commit run --all-files
|
||||
EXIT2=$?
|
||||
git diff man/tmp/*.c > man/tmp/diff-check
|
||||
git restore man/tmp/*.c
|
||||
git restore --staged man/tmp/*.c
|
||||
cat man/tmp/diff-check
|
||||
WC=`cat man/tmp/diff-check | wc -l`
|
||||
if test "$EXIT1" != "0" || test "$EXIT2" != "0" || test "$WC" != "0" ; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
Reference in new issue
Block a user