#!/bin/bash
result=0
nodebin=`pwd`/node_modules/.bin


# Detect ancient npm version
if [ ! -f $nodebin/coveralls ]; then
  nodebin=`pwd`/node_modules/dotest/node_modules/.bin
fi


# List commits since last release
thisTag=`git describe --tags --abbrev=0`
lastTag=`git describe --tags --abbrev=0 HEAD^`

if [ "$thisTag" == "$lastTag" ]; then
  thisTag="HEAD"
fi

echo "Commits since $lastTag to $thisTag"
echo
git log $lastTag..HEAD --oneline --pretty=format:'%C(green)%h%C(reset)  %<(12)%C(blue)%cr%C(reset)% C(red)%D%C(reset)% C(cyan)%s%C(reset)' --abbrev-commit
echo
echo


# ESLint
echo "Running ESLint..."
$nodebin/eslint *.js lib/ test/ || result=1
echo


# Run test script with coverage
$nodebin/istanbul cover test.js || result=1


# Submit coverage to Coveralls.io
if [ "$TRAVIS" == "true" ]; then
  echo
  echo "Sending coverage report to Coveralls..."
  cat `pwd`/coverage/lcov.info | $nodebin/coveralls || result=1
fi


# All done, return exit status
exit $result

#!/bin/bash
result=0
nodebin=`pwd`/node_modules/.bin


# Detect ancient npm version
if [ ! -f $nodebin/coveralls ]; then
  nodebin=`pwd`/node_modules/dotest/node_modules/.bin
fi


# List commits since last release
thisTag=`git describe --tags --abbrev=0`
lastTag=`git describe --tags --abbrev=0 HEAD^`

if [ "$thisTag" == "$lastTag" ]; then
  thisTag="HEAD"
fi

echo "Commits since $lastTag to $thisTag"
echo
git log $lastTag..HEAD --oneline --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(blue)<%an>%Creset' --abbrev-commit
echo
echo


# ESLint
echo "Running ESLint..."
$nodebin/eslint *.js lib/ test/ || result=1
echo


# Run test script with coverage
$nodebin/istanbul cover test.js || result=1


# Submit coverage to Coveralls.io
if [ "$TRAVIS" == "true" ]; then
  echo
  echo "Sending coverage report to Coveralls..."
  cat `pwd`/coverage/lcov.info | $nodebin/coveralls || result=1
fi


# All done, return exit status
exit $result

Revert "Style(runner): Cleaner commit log formatting"
Revert "Style(runner): Cleaner commit log formatting"

This reverts commit 2e27958aad5c7a9352ed021942159fd931a4ae5e.

Travis CI is using ancient git v1.8, no support for padding and others
