mirror of
https://github.com/array-in-a-matrix/public-apis.git
synced 2025-04-02 11:11:50 -04:00
set PR additions file as link validation file
This commit is contained in:
parent
c1b906c368
commit
530d404408
1 changed files with 12 additions and 3 deletions
|
@ -1,7 +1,16 @@
|
|||
#!/bin/bash
|
||||
CHECK_FILE=../README.md
|
||||
FORMAT_FILE=../README.md
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
echo "running on Pull Request #$TRAVIS_PULL_REQUEST"
|
||||
git show | egrep "\+" > additions.txt
|
||||
LINK_FILE=additions.txt
|
||||
else
|
||||
echo "running on $TRAVIS_BRANCH branch"
|
||||
LINK_FILE=../README.md
|
||||
fi
|
||||
|
||||
echo "running format validation..."
|
||||
./validate_format.rb $CHECK_FILE
|
||||
./validate_format.rb $FORMAT_FILE
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "format validation failed!"
|
||||
exit 1
|
||||
|
@ -11,7 +20,7 @@ fi
|
|||
|
||||
if [ "$TRAVIS_BRANCH" == "master" ]; then
|
||||
echo "running link validation..."
|
||||
./validate_links.rb $CHECK_FILE
|
||||
./validate_links.rb $LINK_FILE
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "link validation failed!"
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Reference in a new issue