.travis.yml 853 B

123456789101112131415161718192021222324252627282930
  1. language: go
  2. sudo: false
  3. install:
  4. - mkdir -p "${GOPATH%%:*}/src/github.com/shurcooL/markdownfmt"
  5. - git clone https://github.com/tianon/markdownfmt.git "${GOPATH%%:*}/src/github.com/shurcooL/markdownfmt"
  6. - go get -v github.com/shurcooL/markdownfmt
  7. script:
  8. - files="$(find -name '*.md' -print0 | xargs -0 markdownfmt -l)";
  9. if [ "$files" ]; then
  10. echo >&2 "Need markdownfmt:";
  11. echo >&2 "$files";
  12. echo >&2;
  13. echo "$files" | xargs markdownfmt -d >&2;
  14. exit 1;
  15. fi
  16. - failed='';
  17. for short in */README-short.txt; do
  18. chars="$(echo -n "$(cat "$short")" | wc -m)";
  19. lines="$(cat "$short" | wc -l)";
  20. if [ "$chars" -gt 100 -o "$lines" -gt 1 ]; then
  21. failed+=" $short";
  22. fi
  23. done;
  24. if [ "$failed" ]; then
  25. echo >&2 "Too long (or too many lines):$failed";
  26. exit 1;
  27. fi