Procházet zdrojové kódy

check for no links in link file and fail if not pull request

pull/388/head
Dave Machado před 6 roky
rodič
revize
90e4670ce4
2 změnil soubory, kde provedl 7 přidání a 0 odebrání
  1. +3
    -0
      build/main.sh
  2. +4
    -0
      build/validate_links.rb

+ 3
- 0
build/main.sh Zobrazit soubor

@@ -27,6 +27,9 @@ if [ "$TRAVIS_BRANCH" == "master" ]; then
echo "link validation failed!"
exit 1
else
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
echo "no links to check on $TRAVIS_BRANCH branch - script failure!"
fi
echo "link validation passed!"
fi
fi

+ 4
- 0
build/validate_links.rb Zobrazit soubor

@@ -17,6 +17,10 @@ raw_links.each do |link|
links.push(link)
end
end
if links.length <= 0
puts "no links to check"
exit(0)
end
fails = []
# Fail on any duplicate elements
dup = links.select{|element| links.count(element) > 1}


Načítá se…
Zrušit
Uložit