This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 593
Travis CI to test that website links are valid #709
Merged
billonahill
merged 16 commits into
apache:master
from
billonahill:billg/travis_docs_check_2
May 20, 2016
Merged
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
68fe0cd
Travis CI to test that website links are valid
e17b7b8
chaining commands together
dddca51
chaining commands together
7345bfb
chaining commands together
b9b46ba
chaining commands together
a4fc0bd
escape : for yml
3668a74
escape : for yml
455b652
remove logging
c148956
Fixing return codes
86a41bc
getting build to fail on site failure
054cbad
getting build to fail on site failure
c21c834
Verify we success with good linkcheck
5458b99
Revert testing stuff
af727ad
Moving pip install into Makefile
5bccabb
Moving pip install into Makefile
b82e0ed
Use semicolon not OR
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -1,14 +1,22 @@ | ||
#! bin/bash | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
#linkchecker removes previous runs. | ||
pip install linkchecker | ||
which linkchecker || pip install linkchecker | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd suggest moving this into the |
||
rm -f linkchecker-errors.csv && rm -f linkchecker-out.csv | ||
linkchecker public/index.html --no-warnings -F csv | ||
|
||
set +e | ||
linkchecker public/index.html --no-warnings -F csv | ||
STATUS=$? | ||
set -e | ||
|
||
#uses error code: on fail, write linkchecker-errors.csv for debugging | ||
if [[ $? == 1 ]]; then | ||
if [[ $STATUS != 0 ]]; then | ||
cut -sd ';' -f 1,2 linkchecker-out.csv | tr ';' ' ' | \ | ||
awk '{ print $2 " " $1}' | sort -u >> linkchecker-errors.csv; | ||
echo "linkchecker failed - check linkchecker-errors.csv"; | ||
echo "linkchecker failed - check linkchecker-errors.csv"; | ||
exit $STATUS | ||
else | ||
echo "linkchecker passes"; | ||
fi | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned below, I'd like to see linkchecker installed here