File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 12
12
run : |
13
13
xbps-install -Syu || xbps-install -Syu xbps
14
14
xbps-install -yu
15
- xbps-install -y mdbook-linkcheck vmdfmt git
15
+ xbps-install -y mdbook-linkcheck vmdfmt git findutils
16
16
- uses : actions/checkout@v1
17
17
- run : ./res/ci/format.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
+ ERROR=0
4
+
3
5
cd src/ || exit 2
4
6
5
7
# summary is the list of files taken from SUMMARY.md - unused for now
@@ -9,11 +11,10 @@ files="$( find . -type f -name '*.md' -not -name "SUMMARY.md" )"
9
11
10
12
for file in $files
11
13
do
12
- if ! grep " $file " ./SUMMARY.md > /dev/null 2>&1 ; then
13
- echo " $file not in SUMMARY"
14
+ if ! grep " $file " ./SUMMARY.md > /dev/null ; then
15
+ printf " \033[31;1m=> $file not in SUMMARY\033[m\n "
14
16
ERROR=1
15
17
fi
16
18
done
17
19
18
- [ -z " $ERROR " ] && exit 0
19
- exit 2
20
+ exit $ERROR
Original file line number Diff line number Diff line change 2
2
3
3
git config --global --add safe.directory " $PWD "
4
4
5
- echo " Checking links"
5
+ printf " \033[37;1m=> Checking links\033[m\n "
6
6
RUST_LOG=linkcheck=debug mdbook-linkcheck -s
7
7
LINKCHECK=$?
8
8
9
9
# Format them
10
- printf " Formatting tree"
10
+ printf " \n\033[37;1m=> Formatting tree\033[m\n "
11
11
vmdfmt -l -w src/
12
12
13
13
# Check Status
14
14
if [ ! -z " $( git status --porcelain) " ] ; then
15
15
git diff
16
- echo " Working directory not clean, files to be formatted:"
16
+ printf " \033[31;1m=> Working directory not clean, files to be formatted:\033[m\n "
17
17
git status
18
18
VMDFMT=1
19
19
fi
20
20
21
21
# Check SUMMARY.md
22
- echo " "
23
- echo " Checking SUMMARY.md"
22
+ printf " \n\033[37;1m=> Checking SUMMARY.md\033[m\n"
24
23
res/ci/check-summary.sh
25
24
SUMMARY=$?
26
25
You can’t perform that action at this time.
0 commit comments