diff --git a/deps/rabbitmq_auth_mechanism_ssl/.travis.yml b/deps/rabbitmq_auth_mechanism_ssl/.travis.yml index c46ca0cb3a..a9ac50ebca 100644 --- a/deps/rabbitmq_auth_mechanism_ssl/.travis.yml +++ b/deps/rabbitmq_auth_mechanism_ssl/.travis.yml @@ -9,12 +9,20 @@ addons: - xsltproc otp_release: - "18.3" + - "19.0" -# 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. -before_script: (test "$TRAVIS_TAG" && git checkout "$TRAVIS_TAG") || (test "$TRAVIS_BRANCH" && git checkout "$TRAVIS_BRANCH") +# 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: + - | + 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: make tests