From 7d8dcaee47d18923da80466a21ceda8a3dd2409f Mon Sep 17 00:00:00 2001 From: dvanaken Date: Wed, 23 Oct 2019 23:21:22 -0400 Subject: [PATCH] This shold fix the error from running git reset on an invalid TRAVIS_COMMIT_RANGE from empty commits and rebases --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 772d046..c020c1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,7 @@ before_script: - sudo service mysql stop || true script: + - env | grep TRAVIS | sort - cd $TRAVIS_BUILD_DIR/docker # Build master images and run the webserver - docker-compose build @@ -47,7 +48,7 @@ script: - docker-compose -f docker-compose.test.yml run --workdir="/app/server/website" --rm $ci_env test bash -c "./wait-for-it.sh && python3 manage.py makemigrations website && coverage run --source=website manage.py test --noinput -v 2 && (codecov -F website || (sleep 5 && codecov -F website) || (sleep 5 && codecov -F website))" # Only run the linter once on ubuntu 18.04 - if [ $DOCKER_OS == ubuntu-18.04 ]; then - docker-compose -f docker-compose.test.yml run --workdir="/app" --rm -e TRAVIS_COMMIT_RANGE=$TRAVIS_COMMIT_RANGE test bash -c "git reset --soft ${TRAVIS_COMMIT_RANGE%...*} && git status && git lint"; + docker-compose -f docker-compose.test.yml run --workdir="/app" --rm -e TRAVIS_COMMIT_RANGE=$TRAVIS_COMMIT_RANGE test bash -c "git reset --soft ${TRAVIS_COMMIT_RANGE%...*} && git status && git log | head -n 1 && git lint"; fi after_script: