Travis: add warning when failing

This commit is contained in:
Rico Sta. Cruz 2018-03-17 13:12:48 +08:00
parent 65f1316f28
commit 7ac089b636
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
2 changed files with 11 additions and 3 deletions

View File

@ -2,8 +2,9 @@ language: ruby
rvm: rvm:
- 2.5.0 - 2.5.0
script: script:
- make test - make _site
- if ! make test; then make test-warning; exit 16; fi
cache: cache:
directories: directories:
- node_modules - node_modules
- _site - _site

View File

@ -35,3 +35,10 @@ test: _site
@grep "<script src" _site/index.html >/dev/null @grep "<script src" _site/index.html >/dev/null
@grep "<script src" _site/vim.html >/dev/null @grep "<script src" _site/vim.html >/dev/null
@grep "<script src" _site/react.html >/dev/null @grep "<script src" _site/react.html >/dev/null
test-warning:
@echo "========="
@echo "If your build failed at this point, it means"
@echo "the site failed to generate. Check the project"
@echo "out locally and try to find out why."
@echo "========="