diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2015-09-08 15:15:00 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr> | 2015-10-20 11:10:48 +0200 |
| commit | b31818b598767f7c8b0109c58a37a6d626ca4abf (patch) | |
| tree | 1fe1cbfd044b0421a5af65ba6953452cfb5993ad | |
| parent | 9cac28d6a7aebc0fd2c491a71f444e800ce401b8 (diff) | |
| download | rabbitmq-server-git-b31818b598767f7c8b0109c58a37a6d626ca4abf.tar.gz | |
Use dependency branches matching the parent branch
| -rw-r--r-- | Makefile | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -1,7 +1,24 @@ PROJECT = rabbit -DEPS += rabbit_common -dep_rabbit_common = git https://github.com/rabbitmq/rabbitmq-common.git master +DEPS = rabbit_common + +# For RabbitMQ repositories, we want to checkout branches which match +# the parent porject. For instance, if the parent project is on a +# release tag, dependencies must be on the same release tag. If the +# parent project is on a topic branch, dependencies must be on the same +# topic branch or fallback to `stable` or `master` whichever was the +# base of the topic branch. + +ifeq ($(origin current_rmq_ref),undefined) +current_rmq_ref := $(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match) +export current_rmq_ref +endif +ifeq ($(origin base_rmq_ref),undefined) +base_rmq_ref := $(shell git merge-base --is-ancestor $$(git merge-base master HEAD) stable && echo stable || echo master) +export base_rmq_ref +endif + +dep_rabbit_common = git https://github.com/rabbitmq/rabbitmq-common.git $(current_rmq_ref) $(base_rmq_ref) define usage_xml_to_erl $(subst __,_,$(patsubst $(DOCS_DIR)/rabbitmq%.1.xml, src/rabbit_%_usage.erl, $(subst -,_,$(1)))) |
