#!/usr/bin/env bash
SCRIPT_RELATIVE_PATH=`dirname "$0"`
PROJECT_PATH=`( cd "$SCRIPT_RELATIVE_PATH/.." && pwd )`
CI=true yarn test
if [ $? -ne 0 ]; then
  echo TEST FAILED
  exit -1
else
  yarn build
  if [ $? -ne 0 ]; then
    echo BUILD FAILED
    exit -1
  fi
  git add .
  git commit -m "Incrementing from version $npm_package_version" || true
fi
