diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2016-07-01 12:16:36 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2016-07-01 12:16:36 +0200 |
| commit | 4149120c20010a8c2e7698eb53e0575bc451c298 (patch) | |
| tree | 059c8aaee898b74da63c0292aa4efb7de7a9434c | |
| parent | ef4146b4823f56bc8cd6c8509a4c9a32682fceea (diff) | |
| download | rabbitmq-server-git-4149120c20010a8c2e7698eb53e0575bc451c298.tar.gz | |
Travis CI: Import Git branch handdling from rabbitmq-shovel
| -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) |
