Parcourir la source

set PR additions file as link validation file

pull/388/head
Dave Machado il y a 6 ans
Parent
révision
530d404408
1 fichiers modifiés avec 12 ajouts et 3 suppressions
  1. +12
    -3
      build/main.sh

+ 12
- 3
build/main.sh Voir le fichier

@@ -1,7 +1,16 @@
#!/bin/bash #!/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..." echo "running format validation..."
./validate_format.rb $CHECK_FILE
./validate_format.rb $FORMAT_FILE
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
echo "format validation failed!" echo "format validation failed!"
exit 1 exit 1
@@ -11,7 +20,7 @@ fi


if [ "$TRAVIS_BRANCH" == "master" ]; then if [ "$TRAVIS_BRANCH" == "master" ]; then
echo "running link validation..." echo "running link validation..."
./validate_links.rb $CHECK_FILE
./validate_links.rb $LINK_FILE
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
echo "link validation failed!" echo "link validation failed!"
exit 1 exit 1


Chargement…
Annuler
Enregistrer