From 39b17fd5a394e81ca54699e05acd3f033d7151d7 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 24 Jan 2020 19:59:06 +0300 Subject: [PATCH] Fix empty TRAVIS_COMMIT_RANGE for one-commit-branch builds in Travis (#3299) --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6167b75c8f..0a3ce42f1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -114,6 +114,8 @@ before_cache: - docker save dash-builder-$BUILD_TARGET-$TRAVIS_JOB_NUMBER $(docker history -q dash-builder-$BUILD_TARGET-$TRAVIS_JOB_NUMBER | grep -v \) | gzip -2 > $HOME/cache/docker/dash-builder-$BUILD_TARGET.tar.gz install: + # Fix annoying Travis bug: a branch with a single commit has an empty TRAVIS_COMMIT_RANGE sometimes + - if [ -z "$TRAVIS_COMMIT_RANGE" ]; then export TRAVIS_COMMIT_RANGE="HEAD~..HEAD"; fi # Our scripts try to be Travis agnostic - export PULL_REQUEST="$TRAVIS_PULL_REQUEST" - export COMMIT_RANGE="$TRAVIS_COMMIT_RANGE"