language: node_js
node_js:
  - "4"

env:
  global:
    - FAIL_IF_DIST_MESSAGE="These files are autogenerated. Please don't include changes to these files in your PR "

before_script:
  - npm run build

after_script:
  - npm run coverage
  - npm run coveralls
  - echo "Testing for changed dist files."
  - DIST_CHANGED=`git diff --name-only HEAD $TRAVIS_BRANCH | egrep 'rickshaw(\.min)?\.(js|css)'`; [[ ! -z "$DIST_CHANGED" ]] && printf "\n\n" && echo -e "\033[31m$FAIL_IF_DIST_MESSAGE $DIST_CHANGED" && exit 1
