Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 5b82012

Browse files
committed
Travis CI: Bring branch/tag management from rabbitmq-shovel
1 parent 4974ece commit 5b82012

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.travis.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,18 @@ otp_release:
1313
- "18.0"
1414
- "19.0"
1515

16-
# The checkout made by Travis is a "detached HEAD". We switch back
17-
# to a tag or a branch. This pleases our git_rmq fetch method in
18-
# rabbitmq-components.mk and the proper tag/branch is selected in
19-
# dependencies too.
20-
before_script: (test "$TRAVIS_TAG" && git checkout "$TRAVIS_TAG") || (test "$TRAVIS_BRANCH" && git checkout "$TRAVIS_BRANCH")
16+
# The checkout made by Travis is a "detached HEAD" and branches
17+
# information is missing. Our Erlang.mk's git_rmq fetch method relies on
18+
# it, so we need to restore it.
19+
#
20+
# We simply fetch master and, if it exists, stable branches. A branch is
21+
# created, pointing to the detached HEAD.
22+
before_script:
23+
- |
24+
git checkout -B "${TRAVIS_TAG:-${TRAVIS_BRANCH}}"
25+
git remote add upstream https://github.com/$TRAVIS_REPO_SLUG.git
26+
git fetch upstream stable:stable || :
27+
git fetch upstream master:master || :
2128
2229
script: make tests
2330

0 commit comments

Comments
 (0)