25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

7 yıl önce
123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. FORMAT_FILE=../README.md
  3. if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
  4. echo "running on Pull Request #$TRAVIS_PULL_REQUEST"
  5. DIFF_URL="https://patch-diff.githubusercontent.com/raw/toddmotto/public-apis/pull/$TRAVIS_PULL_REQUEST.diff"
  6. curl $DIFF_URL > diff.txt
  7. echo "------- BEGIN DIFF -------"
  8. cat diff.txt
  9. echo "-------- END DIFF --------"
  10. cat diff.txt | egrep "\+" > additions.txt
  11. echo "------ BEGIN ADDITIONS -----"
  12. cat additions.txt
  13. echo "------- END ADDITIONS ------"
  14. LINK_FILE=additions.txt
  15. else
  16. echo "running on $TRAVIS_BRANCH branch"
  17. LINK_FILE=../README.md
  18. fi
  19. echo "running format validation..."
  20. ./validate_format.rb $FORMAT_FILE
  21. if [[ $? != 0 ]]; then
  22. echo "format validation failed!"
  23. exit 1
  24. else
  25. echo "format validation passed!"
  26. fi
  27. echo "running link validation..."
  28. ./validate_links.rb $LINK_FILE
  29. if [[ $? != 0 ]]; then
  30. echo "link validation failed!"
  31. exit 1
  32. else
  33. echo "link validation passed!"
  34. fi