From bd14baae96d0ba9d45db304f0b15486477434e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Tue, 28 Mar 2017 11:44:26 +0200 Subject: [PATCH] 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] --- packaging/windows-exe/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/windows-exe/Makefile b/packaging/windows-exe/Makefile index 10f2c34915..2d2adeefdb 100644 --- a/packaging/windows-exe/Makefile +++ b/packaging/windows-exe/Makefile @@ -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