packaging/windows: Try to compute a valid default `PRODUCTVERSION`

The `PRODUCTVERSION` must be four integers. So try to replace
everything following the first three integers in the the
semver-formatted `$(VERSION)` by `.0`. For instance if `$(VERSION)` is
`3.6.8+1.g1dcb221`, `PRODUCTVERSION` will be set to `3.6.8.0`.

This should make Windows installer builds successful out-of-the-box.

This is still possible to override this behavior by setting the
`$(PRODUCT_VERSION)` Make variable.

[#142391637]
This commit is contained in:
Jean-Sébastien Pédron 2017-03-28 11:44:26 +02:00
parent 1dcb2211d1
commit bd14baae96
No known key found for this signature in database
GPG Key ID: 39E99761A5FD94CC
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ endif
ZIP = $(notdir $(wildcard $(ZIP_DIR)/rabbitmq-server-windows-*.zip))
VERSION = $(patsubst rabbitmq-server-windows-%.zip,%,$(ZIP))
PRODUCT_VERSION ?= $(VERSION).0
PRODUCT_VERSION ?= $(shell echo "$(VERSION)" | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+).*/\1.0/')
unexport DEPS_DIR
unexport ERL_LIBS