2018-03-21 18:59:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e # halt script on error
|
|
|
|
|
2018-06-24 14:57:24 -04:00
|
|
|
HTMLPROOFER_OPTIONS="./_site --internal-domains=eips.ethereum.org --check-html --check-opengraph --report-missing-names --log-level=:debug --assume-extension --empty-alt-ignore --timeframe=6w --url-ignore=/EIPS/eip-1,EIPS/eip-1,/EIPS/eip-107,/EIPS/eip-858"
|
2018-03-21 18:59:12 +00:00
|
|
|
|
|
|
|
if [[ $TASK = 'htmlproofer' ]]; then
|
2018-03-27 17:24:00 +01:00
|
|
|
bundle exec jekyll doctor
|
|
|
|
bundle exec jekyll build
|
2018-03-21 18:59:12 +00:00
|
|
|
bundle exec htmlproofer $HTMLPROOFER_OPTIONS --disable-external
|
2018-05-17 13:21:03 +01:00
|
|
|
|
|
|
|
# Validate GH Pages DNS setup
|
|
|
|
bundle exec github-pages health-check
|
2018-03-21 18:59:12 +00:00
|
|
|
elif [[ $TASK = 'htmlproofer-external' ]]; then
|
2018-03-27 17:24:00 +01:00
|
|
|
bundle exec jekyll doctor
|
|
|
|
bundle exec jekyll build
|
2018-03-22 00:15:05 +00:00
|
|
|
bundle exec htmlproofer $HTMLPROOFER_OPTIONS --external_only
|
2018-03-27 17:24:00 +01:00
|
|
|
elif [[ $TASK = 'eip-validator' ]]; then
|
2020-09-03 16:58:26 -06:00
|
|
|
if [[ $(find . -maxdepth 1 -name 'eip-*' | wc -l) -ne 1 ]]; then
|
|
|
|
echo "only 'eip-template.md' should be in the root"
|
|
|
|
exit 1
|
|
|
|
fi
|
2020-08-10 10:18:25 -06:00
|
|
|
eipv EIPS/ --ignore=title_max_length,missing_discussions_to --skip=eip-20-token-standard.md
|
2019-05-19 07:54:10 +01:00
|
|
|
elif [[ $TASK = 'codespell' ]]; then
|
2020-08-29 06:11:26 +01:00
|
|
|
codespell -q4 -I .codespell-whitelist -S ".git,Gemfile.lock,**/*.png,**/*.gif,**/*.jpg,**/*.svg,.codespell-whitelist,vendor,_site,_config.yml,style.css"
|
2018-05-17 13:21:03 +01:00
|
|
|
fi
|