mirror of
https://github.com/FranP-code/public-apis.git
synced 2025-10-13 00:03:04 +00:00
set PR additions file as link validation file
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user