forked from phpmyadmin/phpmyadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation checks to be executed in Travis CI
- Validate all internal references - Validate parse errors - Validate external links Signed-off-by: Michal Čihař <[email protected]>
- Loading branch information
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
travis_retry() { | ||
local result=0 | ||
local count=1 | ||
while [ $count -le 3 ]; do | ||
[ $result -ne 0 ] && { | ||
echo -e "\n${ANSI_RED}The command \"$@\" failed. Retrying, $count of 3.${ANSI_RESET}\n" >&2 | ||
} | ||
"$@" | ||
result=$? | ||
[ $result -eq 0 ] && break | ||
count=$(($count + 1)) | ||
sleep 1 | ||
done | ||
|
||
[ $count -gt 3 ] && { | ||
echo -e "\n${ANSI_RED}The command \"$@\" failed 3 times.${ANSI_RESET}\n" >&2 | ||
} | ||
|
||
return $result | ||
} | ||
|
||
# Build documentation with warnings treated as errors | ||
make -C doc html SPHINXOPTS='-n -W -a' | ||
|
||
# Check external links | ||
travis_retry make -C doc linkcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
# We use 1.5 to be able to deal with gzip only sites in linkcheck (such as tcpdf.org) | ||
|
||
pip install --user 'Sphinx>=1.5a2' | ||
|