Update rabbitmq-components.mk

This commit is contained in:
Jean-Sébastien Pédron 2016-12-06 16:36:41 +01:00
parent c096bd8f70
commit 9e0cf9581c
No known key found for this signature in database
GPG Key ID: 39E99761A5FD94CC
1 changed files with 8 additions and 3 deletions

View File

@ -6,8 +6,12 @@ ifeq ($(.DEFAULT_GOAL),)
endif endif
# PROJECT_VERSION defaults to: # PROJECT_VERSION defaults to:
# 1. the version stored in `git-revisions.txt`, if it exists; # 1. the version exported by rabbitmq-server-release;
# 2. a version based on git-describe(1). # 2. the version stored in `git-revisions.txt`, if it exists;
# 3. a version based on git-describe(1), if it is a Git clone;
# 4. 0.0.0
PROJECT_VERSION = $(RABBITMQ_VERSION)
ifeq ($(PROJECT_VERSION),) ifeq ($(PROJECT_VERSION),)
PROJECT_VERSION := $(shell \ PROJECT_VERSION := $(shell \
@ -17,7 +21,8 @@ if test -f git-revisions.txt; then \
else \ else \
(git describe --dirty --abbrev=7 --tags --always --first-parent \ (git describe --dirty --abbrev=7 --tags --always --first-parent \
2>/dev/null || echo rabbitmq_v0_0_0) | \ 2>/dev/null || echo rabbitmq_v0_0_0) | \
sed -e 's/rabbitmq_v//' -e 's/_/./g' -e 's/-/+/' -e 's/-/./g'; \ sed -e 's/^rabbitmq_v//' -e 's/^v//' -e 's/_/./g' -e 's/-/+/' \
-e 's/-/./g'; \
fi) fi)
endif endif