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.

36 satır
954 B

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