File tree Expand file tree Collapse file tree 3 files changed +22
-23
lines changed
Expand file tree Collapse file tree 3 files changed +22
-23
lines changed Original file line number Diff line number Diff line change 22
33ERROR=0
44
5+ printf " \n\033[37;1m=> Checking SUMMARY.md\033[m\n"
6+
57cd src/ || exit 2
68
79# summary is the list of files taken from SUMMARY.md - unused for now
@@ -11,8 +13,8 @@ files="$( find . -type f -name '*.md' -not -name "SUMMARY.md" )"
1113
1214for file in $files
1315do
14- if ! grep " $file " ./SUMMARY.md > /dev/null ; then
15- printf " \033[31;1m=> $file not in SUMMARY\033[m \n"
16+ if ! grep -q " $file " ./SUMMARY.md ; then
17+ printf " ::error title=Summary Lint,file=src/SUMMARY.md:: $file not in SUMMARY.md \n"
1618 ERROR=1
1719 fi
1820done
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- git config --global --add safe.directory " $PWD "
4-
5- printf " \033[37;1m=> Checking links\033[m\n"
6- RUST_LOG=linkcheck=debug mdbook-linkcheck -s
7- LINKCHECK=$?
8-
9- # Format them
103printf " \n\033[37;1m=> Formatting tree\033[m\n"
114vmdfmt -l -w src/
125
136# Check Status
147if [ ! -z " $( git status --porcelain) " ] ; then
15- git diff
16- printf " \033[31;1m=> Working directory not clean, files to be formatted:\033[m\n"
17- git status
18- VMDFMT=1
19- fi
20-
21- # Check SUMMARY.md
22- printf " \n\033[37;1m=> Checking SUMMARY.md\033[m\n"
23- res/ci/check-summary.sh
24- SUMMARY=$?
25-
26- # Generate exit value
27- if [ ! -z $VMDFMT ] || [ ! $LINKCHECK -eq 0 ] || [ ! $SUMMARY -eq 0 ] ; then
28- exit 2
8+ git diff --color=always
9+ printf " \033[31;1m=> Files which need to be formatted:\033[m\n"
10+ for f in $( git status | grep -Po ' modified:\K.*$' ) ; do
11+ printf " $f \n"
12+ printf " ::error title=Formatting Lint,file=$f ,line=1::File has improper formatting\n"
13+ done
14+ exit 1
2915fi
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # only show all the debug messages if ci is run with debug
4+ if [ " $RUNNER_DEBUG " ]; then
5+ loglevel=debug
6+ else
7+ loglevel=error
8+ fi
9+
10+ printf " \033[37;1m=> Checking links\033[m\n"
11+ RUST_LOG=" linkcheck=$loglevel " mdbook-linkcheck -s -c always
You can’t perform that action at this time.
0 commit comments