language: node_js
node_js:
- node
notifications:
  email: false
install:
- npm start
script:
- cd nin/backend && ../../node_modules/.bin/eslint .
- cd ../frontend && make lint
after_success:
  - export PACKAGE_VERSION=$(node -p "require('./package.json').version")
  - export LATEST_TAG=$(git tag | sed 's/^v\(.*\)/\1/' | sort -g | tail -n 1)
  - git config --local user.name "Travis"
  - git config --local user.email "post@ninjadev.org"
  - git tag v$PACKAGE_VERSION
  - git push --tags
before_deploy:
  - cd ~
deploy:
  provider: npm
  skip_cleanup: true
  email: post@ninjadev.org
  api_key:
    secure: iWwXLzno47upqZ0qETbuc+sWEDf9drr/KYulsjWJMCuTdeWj4HuF4NcMSENR43ngeEBO34+NxiAjC0yKe+qPJ6bmq06fYPjobPHUhI9tfWRUsuxxkxhZUnTsR2FaOz7vVe1GTECcqKtR1OAeJH7IPWvanKHNMOyXjUrvSKWPtmo=
  on:
    branch: master
    condition: "\"$PACKAGE_VERSION\" != \"$LATEST_TAG\""

language: node_js
node_js:
- node
notifications:
  email: false
install:
- npm start
script:
- cd nin/backend && ../../node_modules/.bin/eslint .
- cd ../frontend && make lint
after_success:
  - export PACKAGE_VERSION=$(node -p "require('./package.json').version")
  - export LATEST_TAG=$(git tag | sed 's/^v\(.*\)/\1/' | sort -g | tail -n 1)
  - git config --local user.name "Travis"
  - git config --local user.email "post@ninjadev.org"
  - git tag v$PACKAGE_VERSION
  - git push --tags
before_deploy:
  - cd $TRAVIS_BUILD_DIR
deploy:
  provider: npm
  skip_cleanup: true
  email: post@ninjadev.org
  api_key:
    secure: iWwXLzno47upqZ0qETbuc+sWEDf9drr/KYulsjWJMCuTdeWj4HuF4NcMSENR43ngeEBO34+NxiAjC0yKe+qPJ6bmq06fYPjobPHUhI9tfWRUsuxxkxhZUnTsR2FaOz7vVe1GTECcqKtR1OAeJH7IPWvanKHNMOyXjUrvSKWPtmo=
  on:
    branch: master
    condition: "\"$PACKAGE_VERSION\" != \"$LATEST_TAG\""

Switch to TRAVIS_BUILD_DIR before deploying
Switch to TRAVIS_BUILD_DIR before deploying

Developing against travis is _horrible_!
