diff options
| -rw-r--r-- | .travis.yml | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index da19ebc302..bd01b642a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,12 +17,19 @@ env: matrix: - GROUP=1 GROUP=2 -# The checkout made by Travis is a "detached HEAD". We switch back -# to a tag or a branch. This pleases our git_rmq fetch method in -# rabbitmq-components.mk and the proper tag/branch is selected in -# dependencies too. +# The checkout made by Travis is a "detached HEAD" and branches +# information is missing. Our Erlang.mk's git_rmq fetch method relies on +# it, so we need to restore it. +# +# We simply fetch master and, if it exists, stable branches. A branch is +# created, pointing to the detached HEAD. before_script: - - ([ "${GROUP}" = "1" ] && ((test "$TRAVIS_TAG" && git checkout "$TRAVIS_TAG") || (test "$TRAVIS_BRANCH" && git checkout "$TRAVIS_BRANCH")) || /bin/true) + - | + if test "${GROUP}" != "1"; then exit(0) + git checkout -B "${TRAVIS_TAG:-${TRAVIS_BRANCH}}" + git remote add upstream https://github.com/$TRAVIS_REPO_SLUG.git + git fetch upstream stable:stable || : + git fetch upstream master:master || : script: - ([ "${GROUP}" = "1" ] && travis_wait make tests) |
