This shold fix the error from running git reset on an invalid TRAVIS_COMMIT_RANGE from empty commits and rebases

This commit is contained in:
dvanaken 2019-10-23 23:21:22 -04:00 committed by Dana Van Aken
parent cc421ab959
commit 7d8dcaee47
1 changed files with 2 additions and 1 deletions

View File

@ -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: