diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2015-09-21 18:08:44 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr> | 2015-10-20 11:10:48 +0200 |
| commit | 9ba8c4e868276e37b33f550117fdf591e9b88cff (patch) | |
| tree | 7b8ff0bd66ede46eb98dc67910328d76dae1e516 | |
| parent | fe61400611b31a498f263960f07139199edc8460 (diff) | |
| download | rabbitmq-server-git-9ba8c4e868276e37b33f550117fdf591e9b88cff.tar.gz | |
In source-dist, set all applications' version to `$(VERSION)`
When building from `source-dist`, do not attempt to get Git informations
and build all `$(SRCDIST_DEPS)`.
| -rw-r--r-- | Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -8,6 +8,9 @@ ifneq ($(IS_DEP),1) ifneq ($(findstring source-dist,$(MAKECMDGOALS)),) DEPS += $(SRCDIST_DEPS) endif +ifeq ($(wildcard .git),) +DEPS += $(SRCDIST_DEPS) +endif endif # For RabbitMQ repositories, we want to checkout branches which match @@ -17,6 +20,7 @@ endif # topic branch or fallback to `stable` or `master` whichever was the # base of the topic branch. +ifneq ($(wildcard .git),) 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 @@ -25,6 +29,7 @@ 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 +endif dep_rabbit_common = git https://github.com/rabbitmq/rabbitmq-common.git $(current_rmq_ref) $(base_rmq_ref) dep_rabbitmq_shovel = git https://github.com/rabbitmq/rabbitmq-shovel.git $(current_rmq_ref) $(base_rmq_ref) @@ -49,7 +54,8 @@ EXTRA_SOURCES += $(USAGES_ERL) $(PROJECT).d:: $(EXTRA_SOURCES) -DEP_PLUGINS = rabbit_common/mk/rabbitmq-run.mk +DEP_PLUGINS = rabbit_common/mk/rabbitmq-run.mk \ + rabbit_common/mk/rabbitmq-dist.mk # FIXME: Use erlang.mk patched for RabbitMQ, while waiting for PRs to be # reviewed and merged. @@ -171,6 +177,7 @@ distclean-manpages:: .PHONY: source-dist +VERSION ?= $(call get_app_version,src/$(PROJECT).app.src) SOURCE_DIST_BASE ?= rabbitmq-server SOURCE_DIST_SUFFIXES ?= tar.xz zip SOURCE_DIST ?= $(SOURCE_DIST_BASE)-$(VERSION) @@ -224,6 +231,10 @@ $(SOURCE_DIST): $(ERLANG_MK_RECURSIVE_DEPS_LIST) $$dep \ $(SOURCE_DIST)/deps; \ done + $(verbose) for file in $$(find $(SOURCE_DIST) -name '*.app.src'); do \ + sed -E -i.bak -e 's/({vsn\s*,[^}]+})/{vsn, "$(VERSION)"}/' $$file; \ + rm $$file.bak; \ + done $(SOURCE_DIST).tar.gz: $(SOURCE_DIST) $(gen_verbose) $(TAR) -cf - $(TAR_V) $(SOURCE_DIST) | $(GZIP) --best > $@ |
