language: node_js
node_js:
  - "9"
  - "8"
  - "7"
  - "6"
  - "5"
sudo: false

before_install:
  - npm i -g makeshift && makeshift -s @bcoe -r https://registry.npmjs.org

script:
  - npm run test-with-cov

before_deploy:
  - git config --global user.name 'Travis CI'
  - git config --global user.email 'travis@reidweb.com'
  - git remote add push-remote https://${GH_TOKEN}@github.com/ReidWeb/GitInspector-CSV > /dev/null 2>&1

deploy:
  provider: npm
  email: peter@reidweb.com
  tag: next
  api_key: $NPM_TOKEN
  on:
    tags: false
    condition: '$TRAVIS_COMMIT_MESSAGE != *"chore(release)"*'
    node: 8
    repo: ReidWeb/GitInspector-CSV
    branch: master

after_deploy:
  - git push --follow-tags push-remote master

after_success:
  - CODECLIMATE_REPO_TOKEN=$CODECLIMATE_TOKEN ./node_modules/codeclimate-test-reporter/bin/codeclimate.js < ./coverage/lcov.info

git:
  depth: 10

language: node_js
node_js:
  - "9"
  - "8"
  - "7"
  - "6"
  - "5"
sudo: false

before_install:
  - npm i -g makeshift && makeshift -s @bcoe -r https://registry.npmjs.org

script:
  - npm run test-with-cov

before_deploy:
  - git config --global user.name 'Travis CI'
  - git config --global user.email 'travis@reidweb.com'
  - git remote add push-remote https://${GH_TOKEN}@github.com/ReidWeb/GitInspector-CSV > /dev/null 2>&1
  - npm run release

deploy:
  provider: npm
  email: peter@reidweb.com
  tag: next
  api_key: $NPM_TOKEN
  on:
    tags: true
    condition: '$TRAVIS_COMMIT_MESSAGE != *"chore(release)"*'
    node: 8
    repo: ReidWeb/GitInspector-CSV
    branch: master

after_deploy:
  - git push --follow-tags push-remote master

after_success:
  - CODECLIMATE_REPO_TOKEN=$CODECLIMATE_TOKEN ./node_modules/codeclimate-test-reporter/bin/codeclimate.js < ./coverage/lcov.info

git:
  depth: 10

Change release behaviour Do not use Travis' release behaviour
ci(deployment): Change release behaviour
Do not use Travis' release behaviour
