Browse Source

set PR additions file as link validation file

pull/388/head
Dave Machado 6 years ago
parent
commit
530d404408
1 changed files with 12 additions and 3 deletions
  1. +12
    -3
      build/main.sh

+ 12
- 3
build/main.sh View File

@@ -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…
Cancel
Save